Skip to content

Commit

Permalink
fix: remove session if user is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
im-machakata committed Apr 7, 2024
1 parent d7a5819 commit 2fb6d6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Filters/AccountExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function before(RequestInterface $request, $arguments = null)
{
if ($user = session()->get('user')) {
if (!model(Account::class)->find($user->ID)) {
session()->delete('user');
session()->remove('user');
return response()->redirect('/auth/login');
}
}
Expand Down

0 comments on commit 2fb6d6a

Please sign in to comment.