app/library/Auth.php: Adding getImpersonator()
This commit is contained in:
parent
6dc1d0fb87
commit
bf940f9523
1 changed files with 6 additions and 0 deletions
|
|
@ -87,6 +87,12 @@ class Auth extends Injectable
|
||||||
$this->eventsManager->fire('auth:onLogin', $this, 'System');
|
$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
|
* Impersonate a user
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Reference in a new issue