1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-25 20:02:30 +01:00
freescout/app/Listeners/LogLockout.php

35 lines
610 B
PHP
Raw Normal View History

2018-07-08 09:39:12 +02:00
<?php
namespace App\Listeners;
use Illuminate\Auth\Events\Lockout;
class LogLockout
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
2018-07-24 08:34:28 +02:00
* @param Lockout $event
*
2018-07-08 09:39:12 +02:00
* @return void
*/
public function handle(Lockout $event)
{
activity()
->causedBy($event->user)
->withProperties(['ip' => app('request')->ip()])
->useLog(\App\ActivityLog::NAME_USER)
->log(\App\ActivityLog::DESCRIPTION_USER_LOCKED);
}
}