Skip to content
Snippets Groups Projects
Commit 8a69116e authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

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

parent 51b6aab4
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment