From cdb2f559a82e3280c546cf9f1de6a0ae225e3f94 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 31 May 2013 19:58:31 +0200 Subject: [PATCH] Fix postLogin hook --- lib/user.php | 2 +- lib/user/session.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/user.php b/lib/user.php index cd29eb7efd..7e5b70c533 100644 --- a/lib/user.php +++ b/lib/user.php @@ -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 () { diff --git a/lib/user/session.php b/lib/user/session.php index b0fdcd3e85..fcbebee8f8 100644 --- a/lib/user/session.php +++ b/lib/user/session.php @@ -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 {