Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix various buttons issues with reset password (fix #885) and handle …
Browse files Browse the repository at this point in the history
…case insensitive logins.
  • Loading branch information
cdujeu committed Mar 30, 2015
1 parent e5ac62c commit bfcb1b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions core/src/plugins/gui.user/class.UserGuiController.php
Expand Up @@ -118,10 +118,14 @@ public function processUserAccessPoint($action, $httpVars, $fileVars)
if (isSet($httpVars["key"]) && isSet($httpVars["user_id"])) {
$key = ConfService::getConfStorageImpl()->loadTemporaryKey("password-reset", $httpVars["key"]);
ConfService::getConfStorageImpl()->deleteTemporaryKey("password-reset", $httpVars["key"]);
if ($key != null && $key["user_id"] == $httpVars["user_id"] && AuthService::userExists($key["user_id"])) {
$uId = $httpVars["user_id"];
if(AuthService::ignoreUserCase()){
$uId = strtolower($uId);
}
if ($key != null && strtolower($key["user_id"]) == $uId && AuthService::userExists($uId)) {
AuthService::updatePassword($key["user_id"], $httpVars["new_pass"]);
}else{
echo 'ERROR';
echo 'PASS_ERROR';
break;
}
}
Expand Down
4 changes: 3 additions & 1 deletion core/src/plugins/gui.user/manifest.xml
Expand Up @@ -29,7 +29,7 @@
$(oForm).down('.dialogButtons').insert({bottom:$(oForm).down('.dialogButtons').down('input')});
]]></dialogOnOpen>
<dialogOnCancel><![CDATA[
ajaxplorer.actionBar.fireAction('login');
pydio.actionBar.fireAction('login');
]]></dialogOnCancel>
<dialogOnComplete><![CDATA[
if(!oForm.BUTTON_CLICKED){
Expand All @@ -42,6 +42,7 @@
duration:0.5,
afterFinish: function(){
oForm.down('#reset-password-ask').update(MessageHash['gui.user.5']);
$(oForm).down('.dialogButtons').down('input[name="ok"]').remove();
}
});
};
Expand Down Expand Up @@ -91,6 +92,7 @@
}else if(transport.responseText == 'SUCCESS'){
ajaxplorer.displayMessage('SUCCESS', MessageHash['gui.user.6']);
oForm.down('#reset-password').update(MessageHash['gui.user.6']);
$(oForm).down('.dialogButtons').down('input[name="ok"]').remove();
}
}
};
Expand Down

0 comments on commit bfcb1b0

Please sign in to comment.