Added existing account check to logs

This commit is contained in:
Miguel Nogueira 2020-09-08 01:38:56 +01:00
parent 3598a32ecf
commit 937a0206a5
1 changed files with 2 additions and 1 deletions

View File

@ -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(),
]);
}