diff --git a/app/Listeners/LogAuthenticationFailure.php b/app/Listeners/LogAuthenticationFailure.php index 979c2e3..3ce94c7 100644 --- a/app/Listeners/LogAuthenticationFailure.php +++ b/app/Listeners/LogAuthenticationFailure.php @@ -27,7 +27,7 @@ class LogAuthenticationFailure public function handle($event) { Log::alert('SECURITY (login): Detected failed authentication attempt!', [ - 'targetAccountID' => $event->user->id, + 'targetAccountID' => $event->user->id ?? '(nonexistent user)', 'sourceIP' => request()->ip(), 'matchesAccountLastIP' => request()->ip() == $event->user->originalIP, 'sourceUserAgent' => request()->userAgent(),