diff --git a/app/library/Auth.php b/app/library/Auth.php index ac77a2c..0aa51b5 100644 --- a/app/library/Auth.php +++ b/app/library/Auth.php @@ -28,7 +28,11 @@ class Auth extends Component // Verify password $hash = $user->getPassword(); if (strlen($hash) > 1 && password_verify($password, $hash)) { + $this->setIdentity($user->getId()); + + $this->_eventsManager->fire('auth:onLogin', $this, 'password'); + return true; } } @@ -68,6 +72,9 @@ class Auth extends Component } $this->setIdentity($user->getId()); + + $this->_eventsManager->fire('auth:onLogin', $this, + "OAuth {$auth['provider']}"); } /**