mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 15:41:30 +00:00
SetLocalPassword converted to StringFormat
This commit is contained in:
parent
d287d9731e
commit
74b73e6f39
@ -323,17 +323,15 @@ bool Database::DeleteAccount(const char* name) {
|
||||
}
|
||||
|
||||
bool Database::SetLocalPassword(uint32 accid, const char* password) {
|
||||
char *query = nullptr;
|
||||
std::string query = StringFormat("UPDATE account SET password=MD5('%s') where id=%i;", password, accid);
|
||||
|
||||
auto results = QueryDatabase(query, MakeAnyLenString(&query, "UPDATE account SET password=MD5('%s') where id=%i;", password, accid));
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success()) {
|
||||
std::cerr << "Error in SetLocalPassword query '" << query << "' " << results.ErrorMessage() << std::endl;
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
safe_delete_array(query);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user