Fix account password reset bug

This commit is contained in:
Vortrex
2022-01-17 07:42:57 -06:00
parent 0b38e8218e
commit 9512f5e889

View File

@@ -990,8 +990,10 @@ function checkAccountChangePassword(client, newPassword, confirmNewPassword) {
return false; return false;
} }
getPlayerData(client).accountData.password = hashAccountPassword(getPlayerData(client).accountData.name, params); getPlayerData(client).accountData.password = hashAccountPassword(getPlayerData(client).accountData.name, newPassword);
messagePlayerSuccess(client, getLocaleString(client, "PasswordChanged")); messagePlayerSuccess(client, getLocaleString(client, "PasswordChanged"));
showPlayerLoginGUI(client);
getPlayerData(client).accountData.needsSaved = true;
if(getPlayerData(client).passwordResetState == VRR_RESETPASS_STATE_SETPASS) { if(getPlayerData(client).passwordResetState == VRR_RESETPASS_STATE_SETPASS) {
getPlayerData(client).passwordResetState = VRR_RESETPASS_STATE_NONE; getPlayerData(client).passwordResetState = VRR_RESETPASS_STATE_NONE;