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