diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-18 10:54:27 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-18 10:54:27 -0800 |
commit | c8e02060c1259760a18b9c9b0ac609088fd3015c (patch) | |
tree | ade2ac3d9261b90d183e9a6e5c3d88ffe2004ca7 | |
parent | f554347db5271e3ae7e251369e5d73e7ab6cec93 (diff) | |
parent | 06dbcec5a17691d7d31e52cabba94316f040f13b (diff) | |
download | nextcloud-server-c8e02060c1259760a18b9c9b0ac609088fd3015c.tar.gz nextcloud-server-c8e02060c1259760a18b9c9b0ac609088fd3015c.zip |
Merge pull request #1762 from owncloud/user_password_fix
Fix changing user password at 'Personal' page. Ref #1693
-rw-r--r-- | settings/ajax/changepassword.php | 4 | ||||
-rw-r--r-- | settings/templates/personal.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index ceb4bbeecb0..1fc6d0e1000 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -8,7 +8,7 @@ OC_JSON::checkLoggedIn(); OC_APP::loadApps(); $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser(); -$password = $_POST["password"]; +$password = isset($_POST["password"]) ? $_POST["password"] : null; $oldPassword=isset($_POST["oldpassword"])?$_POST["oldpassword"]:''; $userstatus = null; @@ -28,7 +28,7 @@ if(is_null($userstatus)) { } // Return Success story -if( OC_User::setPassword( $username, $password )) { +if(!is_null($password) && OC_User::setPassword( $username, $password )) { OC_JSON::success(array("data" => array( "username" => $username ))); } else{ diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 6b3e8acbf02..6e9ad5e1acb 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -37,7 +37,7 @@ if($_['passwordChangeSupported']) { <div id="passwordchanged"><?php echo $l->t('Your password was changed');?></div> <div id="passworderror"><?php echo $l->t('Unable to change your password');?></div> <input type="password" id="pass1" name="oldpassword" placeholder="<?php echo $l->t('Current password');?>" /> - <input type="password" id="pass2" name="personal-password" placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#personal-show" /> + <input type="password" id="pass2" name="password" placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#personal-show" /> <input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label> <input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" /> </fieldset> |