app/library/Auth.php: Fix typo.
This commit is contained in:
parent
0634db6d0c
commit
6dc1d0fb87
1 changed files with 4 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ use App\Model\Data\User,
|
|||
class Auth extends Injectable
|
||||
{
|
||||
const SESSION_KEY = 'auth';
|
||||
const IMPERSONATEOR_ID = 'auth.impersonateor';
|
||||
const IMPERSONATOR_ID = 'auth.impersonator';
|
||||
|
||||
/**
|
||||
* Login using email/user + password combination.
|
||||
|
|
@ -104,14 +104,14 @@ class Auth extends Injectable
|
|||
throw new \DomainException("Can't impersonate yourself");
|
||||
}
|
||||
|
||||
$this->session->set(self::IMPERSONATEOR_ID, $current->getId());
|
||||
$this->session->set(self::IMPERSONATOR_ID, $current->getId());
|
||||
$this->setIdentity($user->getId());
|
||||
$this->eventsManager->fire('auth:onImpersonate', $this, $current);
|
||||
}
|
||||
|
||||
public function impersonateClear($imp_id)
|
||||
{
|
||||
$this->session->remove(self::IMPERSONATEOR_ID);
|
||||
$this->session->remove(self::IMPERSONATOR_ID);
|
||||
$this->session->set(self::SESSION_KEY, $imp_id);
|
||||
}
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ class Auth extends Injectable
|
|||
*/
|
||||
public function clearIdentity()
|
||||
{
|
||||
$imp_id = $this->session->get(self::IMPERSONATEOR_ID);
|
||||
$imp_id = $this->session->get(self::IMPERSONATOR_ID);
|
||||
if ($imp_id !== null) {
|
||||
$this->impersonateClear($imp_id);
|
||||
} else {
|
||||
|
|
|
|||
Reference in a new issue