app/library/Auth.php: adding systemLogin()
This commit is contained in:
parent
968ca64c1d
commit
31d5740681
1 changed files with 11 additions and 0 deletions
|
|
@ -71,6 +71,17 @@ class Auth extends Component
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The system logs in a user (without credentials).
|
||||||
|
*
|
||||||
|
* @param User $user
|
||||||
|
*/
|
||||||
|
public function systemLogin(User $user)
|
||||||
|
{
|
||||||
|
$this->setIdentity($user->getId());
|
||||||
|
$this->eventsManager->fire('auth:onLogin', $this, 'System');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $identity
|
* @param $identity
|
||||||
* @return Auth
|
* @return Auth
|
||||||
|
|
|
||||||
Reference in a new issue