From 7ec36c5bbb10ea67f2958cd867aa116ffce7ae19 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sun, 19 May 2013 13:33:33 +0200 Subject: [PATCH] Add password to pre_login I need this to intercept passwords for my WIP multi-factor authentication app. --- lib/user.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/user.php b/lib/user.php index 226b716188..b607874afa 100644 --- a/lib/user.php +++ b/lib/user.php @@ -32,7 +32,7 @@ * post_deleteUser(uid) * pre_setPassword(&run, uid, password) * post_setPassword(uid, password) - * pre_login(&run, uid) + * pre_login(&run, uid, password) * post_login(uid) * logout() */ @@ -244,7 +244,7 @@ class OC_User { */ public static function login( $uid, $password ) { $run = true; - OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid )); + OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid, "password" => $password)); if( $run ) { $uid = self::checkPassword( $uid, $password );