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

Commit bfcb1b0

Browse files
committed
Fix various buttons issues with reset password (fix #885) and handle case insensitive logins.
1 parent e5ac62c commit bfcb1b0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

core/src/plugins/gui.user/class.UserGuiController.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,14 @@ public function processUserAccessPoint($action, $httpVars, $fileVars)
118118
if (isSet($httpVars["key"]) && isSet($httpVars["user_id"])) {
119119
$key = ConfService::getConfStorageImpl()->loadTemporaryKey("password-reset", $httpVars["key"]);
120120
ConfService::getConfStorageImpl()->deleteTemporaryKey("password-reset", $httpVars["key"]);
121-
if ($key != null && $key["user_id"] == $httpVars["user_id"] && AuthService::userExists($key["user_id"])) {
121+
$uId = $httpVars["user_id"];
122+
if(AuthService::ignoreUserCase()){
123+
$uId = strtolower($uId);
124+
}
125+
if ($key != null && strtolower($key["user_id"]) == $uId && AuthService::userExists($uId)) {
122126
AuthService::updatePassword($key["user_id"], $httpVars["new_pass"]);
123127
}else{
124-
echo 'ERROR';
128+
echo 'PASS_ERROR';
125129
break;
126130
}
127131
}

core/src/plugins/gui.user/manifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
$(oForm).down('.dialogButtons').insert({bottom:$(oForm).down('.dialogButtons').down('input')});
3030
]]></dialogOnOpen>
3131
<dialogOnCancel><![CDATA[
32-
ajaxplorer.actionBar.fireAction('login');
32+
pydio.actionBar.fireAction('login');
3333
]]></dialogOnCancel>
3434
<dialogOnComplete><![CDATA[
3535
if(!oForm.BUTTON_CLICKED){
@@ -42,6 +42,7 @@
4242
duration:0.5,
4343
afterFinish: function(){
4444
oForm.down('#reset-password-ask').update(MessageHash['gui.user.5']);
45+
$(oForm).down('.dialogButtons').down('input[name="ok"]').remove();
4546
}
4647
});
4748
};
@@ -91,6 +92,7 @@
9192
}else if(transport.responseText == 'SUCCESS'){
9293
ajaxplorer.displayMessage('SUCCESS', MessageHash['gui.user.6']);
9394
oForm.down('#reset-password').update(MessageHash['gui.user.6']);
95+
$(oForm).down('.dialogButtons').down('input[name="ok"]').remove();
9496
}
9597
}
9698
};

0 commit comments

Comments
 (0)