From 8a69116e94be36640896ae1503f53acc303c20df Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 1 May 2012 13:40:01 +0200 Subject: [PATCH] OC_User: don't say password changed when it is not true --- lib/user.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/user.php b/lib/user.php index 25e495ada44..75a63b76c1c 100644 --- a/lib/user.php +++ b/lib/user.php @@ -279,15 +279,16 @@ class OC_User { OC_Hook::emit( "OC_User", "pre_setPassword", array( "run" => &$run, "uid" => $uid, "password" => $password )); if( $run ){ + $success = false; foreach(self::$_usedBackends as $backend){ if($backend->implementsActions(OC_USER_BACKEND_SET_PASSWORD)){ if($backend->userExists($uid)){ - $backend->setPassword($uid,$password); + $success = $backend->setPassword($uid,$password); } } } OC_Hook::emit( "OC_User", "post_setPassword", array( "uid" => $uid, "password" => $password )); - return true; + return $success; } else{ return false; -- 2.39.5