Ask server to handle GUI response for pass reset
This commit is contained in:
@@ -186,9 +186,10 @@ function loginSuccess() {
|
||||
// ===========================================================================
|
||||
|
||||
function switchToPasswordResetGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing password reset dialog window`);
|
||||
showResetPasswordGUI();
|
||||
//closeAllWindows();
|
||||
//logToConsole(LOG_DEBUG, `[VRR.GUI] Showing password reset dialog window`);
|
||||
//showResetPasswordGUI();
|
||||
sendNetworkEventToServer("vrr.checkResetPassword", "");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -980,6 +980,10 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
|
||||
// ===========================================================================
|
||||
|
||||
function checkAccountResetPasswordRequest(client, inputText) {
|
||||
if(!checkForSMTPModule() || !getEmailConfig().enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getPlayerData(client).passwordResetState == VRR_RESETPASS_STATE_NONE) {
|
||||
if(toLowerCase(getPlayerData(client).accountData.emailAddress) != toLowerCase(inputText)) {
|
||||
logToConsole(LOG_DEBUG|LOG_WARN, `${getPlayerDisplayForConsole(client)} failed to reset their password (email not correct)`);
|
||||
|
||||
Reference in New Issue
Block a user