diff --git a/doc/man/wesnothd.6 b/doc/man/wesnothd.6 index 4fab52001fa9..9e8a5d51b1f5 100644 --- a/doc/man/wesnothd.6 +++ b/doc/man/wesnothd.6 @@ -247,7 +247,7 @@ section is present in the configuration the server will run without any nick reg .B db_game_modification_info_table (for user_handler=forum) The name of the table in which wesnothd will save its own data about the modifications used in a game. .TP -.B db_group_table +.B db_user_group_table (for user_handler=forum) The name of the table in which your phpbb forums saves its user group data. Most likely this will be _user_group (e.g. phpbb3_user_group). .TP .B mp_mod_group diff --git a/src/server/forum_user_handler.cpp b/src/server/forum_user_handler.cpp index 712c566553a1..8f6d22ccf796 100644 --- a/src/server/forum_user_handler.cpp +++ b/src/server/forum_user_handler.cpp @@ -45,7 +45,7 @@ fuh::fuh(const config& c) , db_game_info_table_(c["db_game_info_table"].str()) , db_game_player_info_table_(c["db_game_player_info_table"].str()) , db_game_modification_info_table_(c["db_game_modification_info_table"].str()) - , db_group_table_(c["db_group_table"].str()) + , db_user_group_table_(c["db_user_group_table"].str()) , mp_mod_group_(0) , conn(mysql_init(nullptr)) { @@ -416,7 +416,7 @@ void fuh::write_detail(const std::string& name, const std::string& detail, T&& v bool fuh::is_user_in_group(const std::string& name, unsigned int group_id) { try { - return prepared_statement("SELECT 1 FROM `" + db_users_table_ + "` u, `" + db_group_table_ + "` ug WHERE UPPER(u.username)=UPPER(?) AND u.USER_ID = ug.USER_ID AND ug.GROUP_ID = ?", name, group_id); + return prepared_statement("SELECT 1 FROM `" + db_users_table_ + "` u, `" + db_user_group_table_ + "` ug WHERE UPPER(u.username)=UPPER(?) AND u.USER_ID = ug.USER_ID AND ug.GROUP_ID = ?", name, group_id); } catch (const sql_error& e) { ERR_UH << "Could not execute test query for user group '" << group_id << "' and username '" << name << "'" << e.message << std::endl; return false; diff --git a/src/server/forum_user_handler.hpp b/src/server/forum_user_handler.hpp index 77eec2f02e02..3ba943a5c0a2 100644 --- a/src/server/forum_user_handler.hpp +++ b/src/server/forum_user_handler.hpp @@ -105,7 +105,7 @@ class fuh : public user_handler { std::time_t retrieve_ban_duration_internal(const std::string& col, const std::string& detail); std::time_t retrieve_ban_duration_internal(const std::string& col, unsigned int detail); - std::string db_name_, db_host_, db_user_, db_password_, db_users_table_, db_banlist_table_, db_extra_table_, db_game_info_table_, db_game_player_info_table_, db_game_modification_info_table_, db_group_table_; + std::string db_name_, db_host_, db_user_, db_password_, db_users_table_, db_banlist_table_, db_extra_table_, db_game_info_table_, db_game_player_info_table_, db_game_modification_info_table_, db_user_group_table_; unsigned int mp_mod_group_; MYSQL *conn;