Move account deletion emails sending to user observer

This commit is contained in:
DariusIII
2019-02-08 11:29:15 +01:00
parent bcb6227121
commit b4010e271f
4 changed files with 10 additions and 3 deletions
@@ -354,7 +354,6 @@ class ProfileController extends BasePageController
if ($userId !== null && (int) $userId === $this->userdata->id && ! $this->userdata->hasRole('Admin')) {
$user = User::find($userId);
SendAccountDeletedEmail::dispatch($user);
$user->delete();
return redirect('login');