Skip to content
Snippets Groups Projects
Commit 4aa84047 authored by Christopher Schäpers's avatar Christopher Schäpers
Browse files

Remove $recoveryPassword from changepersonalpassword & fix indent

parent a2137648
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,11 @@ if (\OC_App::isEnabled('files_encryption')) { ...@@ -47,7 +47,11 @@ if (\OC_App::isEnabled('files_encryption')) {
} 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 && $recoveryPasswordSupported) {
OC_JSON::error(array("data" => array( "message" => "Back-end doesn't support password change, but the users encryption key was successfully updated." ))); OC_JSON::error(array(
"data" => array(
"message" => "Back-end doesn't support password change, but the users encryption key was successfully updated."
)
));
} elseif (!$result && !$recoveryPasswordSupported) { } elseif (!$result && !$recoveryPasswordSupported) {
OC_JSON::error(array("data" => array( "message" => "Unable to change password" ))); OC_JSON::error(array("data" => array( "message" => "Unable to change password" )));
} else { } else {
......
...@@ -10,7 +10,6 @@ OC_App::loadApps(); ...@@ -10,7 +10,6 @@ OC_App::loadApps();
$username = OC_User::getUser(); $username = OC_User::getUser();
$password = isset($_POST['personal-password']) ? $_POST['personal-password'] : null; $password = isset($_POST['personal-password']) ? $_POST['personal-password'] : null;
$oldPassword = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : ''; $oldPassword = isset($_POST['oldpassword']) ? $_POST['oldpassword'] : '';
$recoveryPassword = isset($_POST['recoveryPassword']) ? $_POST['recoveryPassword'] : null;
if (!OC_User::checkPassword($username, $oldPassword)) { if (!OC_User::checkPassword($username, $oldPassword)) {
$l = new \OC_L10n('settings'); $l = new \OC_L10n('settings');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment