Fix postLogin hook

This commit is contained in:
Robin Appelman 2013-05-31 19:58:31 +02:00
parent 473f3c6916
commit cdb2f559a8
2 changed files with 2 additions and 2 deletions

View File

@ -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 () {

View File

@ -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 {