fix broken variable name, recoveryPasswordSupported is now recoveryEnabledForUser

remotes/origin/fix-10825
Bjoern Schiessle 11 years ago
parent 53c5a84eac
commit c67fee3abd
  1. 6
      settings/changepassword/controller.php

@ -56,7 +56,7 @@ class Controller {
$recoveryAdminEnabled = \OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled'); $recoveryAdminEnabled = \OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
$validRecoveryPassword = false; $validRecoveryPassword = false;
$recoveryPasswordSupported = false; $recoveryEnabledForUser = false;
if ($recoveryAdminEnabled) { if ($recoveryAdminEnabled) {
$validRecoveryPassword = $util->checkRecoveryPassword($recoveryPassword); $validRecoveryPassword = $util->checkRecoveryPassword($recoveryPassword);
$recoveryEnabledForUser = $util->recoveryEnabledForUser(); $recoveryEnabledForUser = $util->recoveryEnabledForUser();
@ -74,14 +74,14 @@ class Controller {
))); )));
} else { // now we know that everything is fine regarding the recovery password, let's try to change the password } else { // now we know that everything is fine regarding the recovery password, let's try to change the password
$result = \OC_User::setPassword($username, $password, $recoveryPassword); $result = \OC_User::setPassword($username, $password, $recoveryPassword);
if (!$result && $recoveryPasswordSupported) { if (!$result && $recoveryEnabledForUser) {
$l = new \OC_L10n('settings'); $l = new \OC_L10n('settings');
\OC_JSON::error(array( \OC_JSON::error(array(
"data" => array( "data" => array(
"message" => $l->t("Back-end doesn't support password change, but the users encryption key was successfully updated.") "message" => $l->t("Back-end doesn't support password change, but the users encryption key was successfully updated.")
) )
)); ));
} elseif (!$result && !$recoveryPasswordSupported) { } elseif (!$result && !$recoveryEnabledForUser) {
$l = new \OC_L10n('settings'); $l = new \OC_L10n('settings');
\OC_JSON::error(array("data" => array( "message" => $l->t("Unable to change password" ) ))); \OC_JSON::error(array("data" => array( "message" => $l->t("Unable to change password" ) )));
} else { } else {

Loading…
Cancel
Save