Misc fixes

This commit is contained in:
hondacrx
2024-02-06 22:12:17 -05:00
parent 19e7f86c26
commit 6abce678ca
14 changed files with 62 additions and 38 deletions
+11 -7
View File
@@ -294,15 +294,11 @@ namespace Game
return false;
}
public bool CheckPassword(uint accountId, string password)
public bool CheckPassword(string username, string password)
{
string username;
PreparedStatement stmt = LoginDatabase.GetPreparedStatement(LoginStatements.SEL_CHECK_PASSWORD_BY_NAME);
stmt.AddValue(0, username);
if (!GetName(accountId, out username))
return false;
PreparedStatement stmt = LoginDatabase.GetPreparedStatement(LoginStatements.SEL_CHECK_PASSWORD);
stmt.AddValue(0, accountId);
SQLResult result = DB.Login.Query(stmt);
if (!result.IsEmpty())
{
@@ -315,6 +311,14 @@ namespace Game
return false;
}
public bool CheckPassword(uint accountId, string password)
{
if (!GetName(accountId, out string username))
return false;
return CheckPassword(username, password);
}
public bool CheckEmail(uint accountId, string newEmail)
{
string oldEmail;