app/library/Auth.php: Adding getImpersonator()
This commit is contained in:
parent
793eb826df
commit
cd408c2e35
1 changed files with 6 additions and 0 deletions
|
|
@ -87,6 +87,12 @@ class Auth extends Injectable
|
|||
$this->eventsManager->fire('auth:onLogin', $this, 'System');
|
||||
}
|
||||
|
||||
public function getImpersonator()
|
||||
{
|
||||
$id = $this->session->get(self::IMPERSONATOR_ID);
|
||||
return $id !== null ? User::findFirst($id) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Impersonate a user
|
||||
*
|
||||
|
|
|
|||
Reference in a new issue