Add preLoginValidation hook
Signed-off-by: Sandro Lutz <sandro.lutz@temparus.ch>
This commit is contained in:
parent
4456fa57e0
commit
4ebcd5ac0b
2 changed files with 6 additions and 0 deletions
|
@ -216,6 +216,9 @@ class LoginController extends Controller {
|
|||
}
|
||||
|
||||
$originalUser = $user;
|
||||
|
||||
$this->userManager->emit('\OC\User', 'preLoginValidation', array($user, $password));
|
||||
|
||||
// TODO: Add all the insane error handling
|
||||
/* @var $loginResult IUser */
|
||||
$loginResult = $this->userManager->checkPassword($user, $password);
|
||||
|
|
|
@ -295,6 +295,9 @@ class Server extends ServerContainer implements IServerContainer {
|
|||
/** @var $user \OC\User\User */
|
||||
\OC_Hook::emit('OC_User', 'post_setPassword', array('run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword));
|
||||
});
|
||||
$userSession->listen('\OC\User', 'preLoginValidation', function ($uid, $password) {
|
||||
\OC_Hook::emit('OC_User', 'pre_loginValidation', array('run' => true, 'uid' => $uid, 'password' => $password));
|
||||
});
|
||||
$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
|
||||
\OC_Hook::emit('OC_User', 'pre_login', array('run' => true, 'uid' => $uid, 'password' => $password));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue