OC_User: don't say password changed when it is not true
This commit is contained in:
parent
51b6aab436
commit
8a69116e94
|
@ -279,15 +279,16 @@ class OC_User {
|
||||||
OC_Hook::emit( "OC_User", "pre_setPassword", array( "run" => &$run, "uid" => $uid, "password" => $password ));
|
OC_Hook::emit( "OC_User", "pre_setPassword", array( "run" => &$run, "uid" => $uid, "password" => $password ));
|
||||||
|
|
||||||
if( $run ){
|
if( $run ){
|
||||||
|
$success = false;
|
||||||
foreach(self::$_usedBackends as $backend){
|
foreach(self::$_usedBackends as $backend){
|
||||||
if($backend->implementsActions(OC_USER_BACKEND_SET_PASSWORD)){
|
if($backend->implementsActions(OC_USER_BACKEND_SET_PASSWORD)){
|
||||||
if($backend->userExists($uid)){
|
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 ));
|
OC_Hook::emit( "OC_User", "post_setPassword", array( "uid" => $uid, "password" => $password ));
|
||||||
return true;
|
return $success;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue