mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Update logic in UserManagerDB, as the default user id is -1 now.
This commit is contained in:
parent
70b8c7c047
commit
56fb104e14
@ -139,7 +139,7 @@ Ref<User> UserManagerDB::_get_user_name(const String &user_name) {
|
||||
void UserManagerDB::_save_user(Ref<User> user) {
|
||||
Ref<QueryBuilder> b = get_query_builder();
|
||||
|
||||
if (user->get_user_id() == 0) {
|
||||
if (user->get_user_id() == -1) {
|
||||
b->insert(_database_table_name, "username, email, rank, pre_salt, post_salt, password_hash, banned, password_reset_token, locked");
|
||||
|
||||
b->values();
|
||||
@ -156,7 +156,7 @@ void UserManagerDB::_save_user(Ref<User> user) {
|
||||
|
||||
b->end_command();
|
||||
b->select_last_insert_id();
|
||||
|
||||
|
||||
Ref<QueryResult> r = b->run();
|
||||
|
||||
user->set_user_id(r->get_last_insert_rowid());
|
||||
|
Loading…
Reference in New Issue
Block a user