diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 40691cce4..9b3f03d05 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -23,6 +23,7 @@ use App\Http\Controllers\Settings\{ }; use App\Jobs\DeletePipeline\DeleteAccountPipeline; use App\Jobs\MediaPipeline\MediaSyncLicensePipeline; +use App\Services\AccountService; class SettingsController extends Controller { @@ -136,6 +137,8 @@ class SettingsController extends Controller abort_if($user->is_admin, 403); $profile = $user->profile; $ts = Carbon::now()->addMonth(); + $user->email = $user->id; + $user->password = ''; $user->status = 'delete'; $profile->status = 'delete'; $user->delete_after = $ts; @@ -143,8 +146,9 @@ class SettingsController extends Controller $user->save(); $profile->save(); Cache::forget('profiles:private'); + AccountService::del($profile->id); Auth::logout(); - DeleteAccountPipeline::dispatch($user)->onQueue('high'); + DeleteAccountPipeline::dispatch($user)->onQueue('low'); return redirect('/'); } diff --git a/app/Jobs/DeletePipeline/DeleteAccountPipeline.php b/app/Jobs/DeletePipeline/DeleteAccountPipeline.php index 76e3b4938..4ca5195c6 100644 --- a/app/Jobs/DeletePipeline/DeleteAccountPipeline.php +++ b/app/Jobs/DeletePipeline/DeleteAccountPipeline.php @@ -57,6 +57,8 @@ class DeleteAccountPipeline implements ShouldQueue protected $user; + public $timeout = 900; + public function __construct(User $user) { $this->user = $user;