diff --git a/app/Listeners/LogFailedLogin.php b/app/Listeners/LogFailedLogin.php index e289ea57..c6ba3305 100644 --- a/app/Listeners/LogFailedLogin.php +++ b/app/Listeners/LogFailedLogin.php @@ -30,6 +30,10 @@ class LogFailedLogin $user = $event->user; $request = request(); + if(!$user) { + return; + } + $log = new AccountLog(); $log->user_id = $user->id; $log->item_id = $user->id;