Archived
1
0
Fork 0

app/library/Auth.php: adding systemLogin()

This commit is contained in:
Henrik Hautakoski 2018-08-14 20:35:23 +02:00
parent 968ca64c1d
commit 31d5740681
No known key found for this signature in database
GPG key ID: 839F3A7EAFAEAFAA

View file

@ -71,6 +71,17 @@ class Auth extends Component
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
* @return Auth