diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-05-01 13:40:01 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-05-01 13:40:01 +0200 |
commit | 8a69116e94be36640896ae1503f53acc303c20df (patch) | |
tree | 1a6569520ae09b3b87424612dc9b896fa6ed73e5 /lib/user.php | |
parent | 51b6aab436897a2a45bac71370012de3105ca70a (diff) | |
download | nextcloud-server-8a69116e94be36640896ae1503f53acc303c20df.tar.gz nextcloud-server-8a69116e94be36640896ae1503f53acc303c20df.zip |
OC_User: don't say password changed when it is not true
Diffstat (limited to 'lib/user.php')
-rw-r--r-- | lib/user.php | 5 |
1 files 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; |