From 76673a42e84be4a9743f5e3baa500fd716070dea Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 20 Mar 2022 13:53:45 -0500 Subject: [PATCH] Ask server to handle GUI response for pass reset --- scripts/client/gui/login.js | 7 ++++--- scripts/server/account.js | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/client/gui/login.js b/scripts/client/gui/login.js index 0e27789d..39c443c7 100644 --- a/scripts/client/gui/login.js +++ b/scripts/client/gui/login.js @@ -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; } diff --git a/scripts/server/account.js b/scripts/server/account.js index c4316633..c128ea23 100644 --- a/scripts/server/account.js +++ b/scripts/server/account.js @@ -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)`);