diff --git a/app/Listeners/LogAuthenticationFailure.php b/app/Listeners/LogAuthenticationFailure.php index 4286928..afe1fee 100644 --- a/app/Listeners/LogAuthenticationFailure.php +++ b/app/Listeners/LogAuthenticationFailure.php @@ -27,6 +27,7 @@ class LogAuthenticationFailure public function handle($event) { $targetAccountID = 0; + $originalIP = "0.0.0.0"; if (isset($event->user->id)) { @@ -37,7 +38,7 @@ class LogAuthenticationFailure 'targetAccountID' => $targetAccountID, 'existingAccount' => ($targetAccountID == 0) ? false : true, 'sourceIP' => request()->ip(), - 'matchesAccountLastIP' => request()->ip() == $event->user->originalIP, + 'matchesAccountLastIP' => request()->ip() == $originalIP, 'sourceUserAgent' => request()->userAgent(), ]); }