mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
Fix column names.
This commit is contained in:
parent
f69597c723
commit
2d7b9e4fd3
@ -54,7 +54,7 @@ Ref<User> 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<QueryResult> r = b->run();
|
||||
@ -155,7 +155,7 @@ todo
|
||||
bool UserModel::is_username_taken(const std::string &user_name_input) {
|
||||
Ref<QueryBuilder> 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<QueryResult> 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<QueryBuilder> 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<QueryResult> r = b->run();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user