Fix bugs: Logically Fail to Login in when table is empty

This commit is contained in:
2025-04-22 18:57:48 +08:00
parent 262bd165e1
commit 27bbb5eb84
3 changed files with 32 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ struct UserStruct {
void init_user_data(sqlite3 *db);
bool is_user_table_empty(sqlite3 *db);
void register_user(sqlite3 *db, const string &username,
const string &userpassword);
bool login_user(sqlite3 *db, const std::string &username,