Fix postLogin hook
This commit is contained in:
parent
473f3c6916
commit
cdb2f559a8
|
@ -64,7 +64,7 @@ class OC_User {
|
|||
self::$userSession->listen('\OC\User', 'preLogin', function ($uid, $password) {
|
||||
\OC_Hook::emit('OC_User', 'pre_login', array("run" => true, "uid" => $uid, "password" => $password));
|
||||
});
|
||||
self::$userSession->listen('\OC\User', 'preDeleteUser', function ($user, $password) {
|
||||
self::$userSession->listen('\OC\User', 'postLogin', function ($user, $password) {
|
||||
\OC_Hook::emit('OC_User', 'post_login', array("run" => true, "uid" => $user->getUID(), "password" => $password));
|
||||
});
|
||||
self::$userSession->listen('\OC\User', 'logout', function () {
|
||||
|
|
|
@ -116,7 +116,7 @@ class Session implements Emitter {
|
|||
if ($user) {
|
||||
$result = $user->checkPassword($password);
|
||||
if ($result and $user->isEnabled()) {
|
||||
$this->manager->emit('\OC\User', 'postLogin', array($user));
|
||||
$this->manager->emit('\OC\User', 'postLogin', array($user, $password));
|
||||
$this->setUser($user);
|
||||
return true;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue