diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-10-15 23:49:49 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2012-10-15 23:49:49 +0200 |
commit | f475ed5cc1733ae768f0f7518a70e88977d33f75 (patch) | |
tree | 1f7d42bc70d587b7412fbe0ded779212e5e125a4 /settings | |
parent | c9ac1364d179bde343f0fd943d30b6fdc3330a0d (diff) | |
download | nextcloud-server-f475ed5cc1733ae768f0f7518a70e88977d33f75.tar.gz nextcloud-server-f475ed5cc1733ae768f0f7518a70e88977d33f75.zip |
Revert "Remove old password check from changepassword and use verifyUser instead"
This reverts commit e6b8153865a521a4750ec44016c5f22f453edfe1.
Diffstat (limited to 'settings')
-rw-r--r-- | settings/ajax/changepassword.php | 3 | ||||
-rw-r--r-- | settings/templates/personal.php | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index 5d94497ce58..5eab751b04e 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -10,6 +10,7 @@ OC_JSON::verifyUser(); $username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser(); $password = $_POST["password"]; +$oldPassword=isset($_POST["oldpassword"])?$_POST["oldpassword"]:''; $userstatus = null; if(OC_Group::inGroup(OC_User::getUser(), 'admin')) { @@ -18,7 +19,7 @@ if(OC_Group::inGroup(OC_User::getUser(), 'admin')) { if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { $userstatus = 'subadmin'; } -if(OC_User::getUser() == $username) { +if(OC_User::getUser() == $username && OC_User::checkPassword($username, $oldPassword)) { $userstatus = 'user'; } diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 0683bd3b64f..55ff24b4223 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -18,8 +18,9 @@ <fieldset class="personalblock"> <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="password" placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#show" /> - <input type="password" id="pass2" name="password" placeholder="<?php echo $l->t('Verify password');?>" data-typetoggle="#show" /> + <input type="password" id="pass1" name="oldpassword" placeholder="<?php echo $l->t('Current password');?>" /> + <input type="password" id="pass2" name="password" placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#show" /> + <input type="checkbox" id="show" name="show" /><label for="show"><?php echo $l->t('show');?></label> <input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" /> </fieldset> </form> |