From 2d7b9e4fd33633afd7322cfa644121a5608dab73 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 22 Aug 2021 22:32:58 +0200 Subject: [PATCH] Fix column names. --- modules/users/user_model.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/users/user_model.cpp b/modules/users/user_model.cpp index d361c04..4557b24 100644 --- a/modules/users/user_model.cpp +++ b/modules/users/user_model.cpp @@ -54,7 +54,7 @@ Ref UserModel::get_user(const std::string &user_name_input) { b->select("id, email, rank, pre_salt, post_salt, password_hash, banned, password_reset_token, locked"); b->from(_table_name); - b->where()->ewp("name", user_name_input); + b->where()->ewp("username", user_name_input); b->end_command(); Ref r = b->run(); @@ -155,7 +155,7 @@ todo bool UserModel::is_username_taken(const std::string &user_name_input) { Ref b = DatabaseManager::get_singleton()->ddb->get_query_builder(); - b->select("id")->from(_table_name)->where("name")->elike(user_name_input)->end_command(); + b->select("id")->from(_table_name)->where("username")->elike(user_name_input)->end_command(); Ref r = b->run(); @@ -164,7 +164,7 @@ bool UserModel::is_username_taken(const std::string &user_name_input) { bool UserModel::is_email_taken(const std::string &email_input) { Ref b = DatabaseManager::get_singleton()->ddb->get_query_builder(); - b->select("id")->from(_table_name)->where("name")->elike(email_input)->end_command(); + b->select("id")->from(_table_name)->where("username")->elike(email_input)->end_command(); Ref r = b->run();