app/listeners/ActivityLog.php: Adding onImpersonate listener
This commit is contained in:
parent
8b44550f06
commit
1214b39502
1 changed files with 13 additions and 0 deletions
|
|
@ -23,6 +23,19 @@ class ActivityLog extends Injectable
|
|||
$this->_log($auth->getUser(), sprintf("Logged in (%s)", $type));
|
||||
}
|
||||
|
||||
/**
|
||||
* On Impersonate event.
|
||||
*
|
||||
* @param Event $event
|
||||
* @param Auth $auth
|
||||
* @param User $user The user Impersonating the user in $auth
|
||||
*/
|
||||
public function onImpersonate(Event $event, Auth $auth, User $user)
|
||||
{
|
||||
$imp = $auth->getUser();
|
||||
$this->_log($user, sprintf("Impersonated user (%s:%s)", $imp->getId(), $imp->getUsername()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
* @param User $auth
|
||||
|
|
|
|||
Reference in a new issue