forked from miguel456/rbrecruiter
Added existing account check to logs
This commit is contained in:
parent
ac8b303e2c
commit
3598a32ecf
|
@ -26,8 +26,16 @@ class LogAuthenticationFailure
|
||||||
*/
|
*/
|
||||||
public function handle($event)
|
public function handle($event)
|
||||||
{
|
{
|
||||||
|
$targetAccountID = 0;
|
||||||
|
|
||||||
|
if (isset($event->user->id))
|
||||||
|
{
|
||||||
|
$targetAccountID = $event->user->id;
|
||||||
|
}
|
||||||
|
|
||||||
Log::alert('SECURITY (login): Detected failed authentication attempt!', [
|
Log::alert('SECURITY (login): Detected failed authentication attempt!', [
|
||||||
'targetAccountID' => $event->user->id ?? '(nonexistent user)',
|
'targetAccountID' => $targetAccountID,
|
||||||
|
'existingAccount' => ($targetAccountID == 0) ? false : true,
|
||||||
'sourceIP' => request()->ip(),
|
'sourceIP' => request()->ip(),
|
||||||
'matchesAccountLastIP' => request()->ip() == $event->user->originalIP,
|
'matchesAccountLastIP' => request()->ip() == $event->user->originalIP,
|
||||||
'sourceUserAgent' => request()->userAgent(),
|
'sourceUserAgent' => request()->userAgent(),
|
||||||
|
|
Loading…
Reference in New Issue