diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2025-06-20 15:28:40 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2025-06-20 15:28:40 +0100 |
| commit | 1a14795d6a48b665b21536979d2260bd139378bb (patch) | |
| tree | 7aec40f4e1fa27eac65b60ec81234e32fccfd9b7 /app/Services | |
| parent | cc6aa1e23de55df7d7a3de1cde89b965ba91ef9b (diff) | |
| download | webtrees-1a14795d6a48b665b21536979d2260bd139378bb.tar.gz webtrees-1a14795d6a48b665b21536979d2260bd139378bb.tar.bz2 webtrees-1a14795d6a48b665b21536979d2260bd139378bb.zip | |
Fix: #5147 - delete user sessions when deleting users
Diffstat (limited to 'app/Services')
| -rw-r--r-- | app/Services/UserService.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Services/UserService.php b/app/Services/UserService.php index f79d1de151..466b6ab7d2 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -335,6 +335,10 @@ class UserService */ public function delete(User $user): void { + DB::table('session') + ->where('user_id', '=', $user->id()) + ->delete(); + // Don't delete the logs, just set the user to null. DB::table('log') ->where('user_id', '=', $user->id()) |
