OC_User: don't say password changed when it is not true

This commit is contained in:
Arthur Schiwon 2012-05-01 13:40:01 +02:00
parent 51b6aab436
commit 8a69116e94
1 changed files with 3 additions and 2 deletions

View File

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