Skip to content

Commit 2f34406

Browse files
authored
🐛 use correct deletion function for inactive users (#3165)
1 parent 3b6d547 commit 2f34406

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Http/Controllers/Backend/User/AccountDeletionController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Helpers\CacheKey;
66
use App\Http\Controllers\Controller;
7+
use App\Http\Controllers\Backend\UserController;
78
use App\Mail\AccountDeletionNotificationTwoWeeksBefore;
89
use App\Models\User;
910
use Exception;
@@ -67,7 +68,7 @@ public static function deleteInactiveUsers(): void {
6768
}
6869

6970
Log::info('Deleting inactive user ' . $user->id . ' (' . $user->email . ')');
70-
$user->delete();
71+
UserController::deleteUserAccount($user);
7172
} catch (Exception $e) {
7273
Log::error('Error deleting inactive user ' . $user->id . ' (' . $user->email . '): ' . $e->getMessage());
7374
}

0 commit comments

Comments
 (0)