aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Accounts/AccountMgr.cpp
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2020-08-06 00:20:23 +0200
committerGitHub <noreply@github.com>2020-08-06 00:20:23 +0200
commit44a3aad0af4bdd132b8761761dc83df2d7d6c601 (patch)
tree31175d6be5986c2e463e1c945fc9ca15a28ca0d0 /src/server/game/Accounts/AccountMgr.cpp
parent53effff9b2ee6d9d1d24b293e8fc8e096f00febc (diff)
Core/Authserver: Deprecation of sha_pass_hash (PR #25138)
see also #25157
Diffstat (limited to 'src/server/game/Accounts/AccountMgr.cpp')
-rw-r--r--src/server/game/Accounts/AccountMgr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp
index 19876a4e192..244e463563d 100644
--- a/src/server/game/Accounts/AccountMgr.cpp
+++ b/src/server/game/Accounts/AccountMgr.cpp
@@ -187,6 +187,7 @@ AccountOpResult AccountMgr::ChangeUsername(uint32 accountId, std::string newUser
stmt->setUInt32(2, accountId);
LoginDatabase.Execute(stmt);
+ if (sWorld->getBoolConfig(CONFIG_SET_SHAPASSHASH))
{
LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_LOGON_LEGACY);
stmt->setString(0, CalculateShaPassHash_DEPRECATED_DONOTUSE(newUsername, newPassword));
@@ -223,6 +224,7 @@ AccountOpResult AccountMgr::ChangePassword(uint32 accountId, std::string newPass
stmt->setUInt32(2, accountId);;
LoginDatabase.Execute(stmt);
+ if (sWorld->getBoolConfig(CONFIG_SET_SHAPASSHASH))
{
LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_LOGON_LEGACY);
stmt->setString(0, CalculateShaPassHash_DEPRECATED_DONOTUSE(username, newPassword));