Skip to content

Commit

Permalink
🐛 use correct deletion function for inactive users (#3165)
Browse files Browse the repository at this point in the history
  • Loading branch information
ygerlach authored Jan 17, 2025
1 parent 3b6d547 commit 2f34406
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use App\Helpers\CacheKey;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Backend\UserController;
use App\Mail\AccountDeletionNotificationTwoWeeksBefore;
use App\Models\User;
use Exception;
Expand Down Expand Up @@ -67,7 +68,7 @@ public static function deleteInactiveUsers(): void {
}

Log::info('Deleting inactive user ' . $user->id . ' (' . $user->email . ')');
$user->delete();
UserController::deleteUserAccount($user);
} catch (Exception $e) {
Log::error('Error deleting inactive user ' . $user->id . ' (' . $user->email . '): ' . $e->getMessage());
}
Expand Down

0 comments on commit 2f34406

Please sign in to comment.