mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2024-11-25 11:52:29 +01:00
35 lines
669 B
PHP
35 lines
669 B
PHP
<?php
|
|
|
|
namespace App\Listeners;
|
|
|
|
use App\Events\UserDeleted;
|
|
|
|
class LogUserDeletion
|
|
{
|
|
/**
|
|
* Create the event listener.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the event.
|
|
*
|
|
* @param Login $event
|
|
*
|
|
* @return void
|
|
*/
|
|
public function handle(UserDeleted $event)
|
|
{
|
|
activity()
|
|
->causedBy($event->user)
|
|
->withProperties(['deleted_user' => $event->deleted_user->getFullName().' ['.$event->deleted_user->id.']'])
|
|
->useLog(\App\ActivityLog::NAME_USER)
|
|
->log(\App\ActivityLog::DESCRIPTION_USER_DELETED);
|
|
}
|
|
}
|