15 #ifndef FORUM_USER_HANDLER_HPP_INCLUDED
16 #define FORUM_USER_HANDLER_HPP_INCLUDED
23 #include <mysql/mysql.h>
97 typedef std::unique_ptr<MYSQL_RES, decltype(&mysql_free_result)>
mysql_result;
117 #endif //FORUM_USER_HANDLER_HPP_INCLUDED
std::string get_hash(const std::string &user)
std::string db_query_to_string(const std::string &query)
void password_reminder(const std::string &name)
Send a password reminder email to the given user.
void set_user_detail(const std::string &user, const std::string &detail, const std::string &value)
Set data for a given user name.
std::string create_pepper(const std::string &name)
Needed because the hashing algorithm used by phpbb requires some info from the original hash to recre...
std::unique_ptr< MYSQL_RES, decltype(&mysql_free_result)> mysql_result
bool is_inactive(const std::string &user)
void user_logged_in(const std::string &name)
Executed when the user with the given name logged in.
void clean_up()
Called by the server once a day.
void set_lastlogin(const std::string &user, const time_t &lastlogin)
void add_user(const std::string &name, const std::string &mail, const std::string &password)
Adds a user.
std::string user_info(const std::string &name)
Returns a string containing info like the last login of this user.
bool user_exists(const std::string &name)
Returns true if a user with the given name exists.
void set_is_moderator(const std::string &name, const bool &is_moderator)
Mark this user as a moderator.
mysql_result db_query(const std::string &query)
A user_handler implementation to link the server with a phpbb3 forum.
bool extra_row_exists(const std::string &name)
std::string get_writable_detail_for_user(const std::string &name, const std::string &detail)
bool use_phpbb_encryption() const
Does this user_handler want passwords passed encrypted using phpbb's algorithm?
GLsizei const GLfloat * value
An interface class to handle nick registration To activate it put a [user_handler] section into the s...
time_t get_lastlogin(const std::string &user)
bool login(const std::string &name, const std::string &password, const std::string &seed)
Return true if the given password matches the password for the given user.
std::string db_extra_table_
bool user_is_active(const std::string &name)
Returns true if the specified user account is usable for logins.
time_t get_registrationdate(const std::string &user)
std::string db_users_table_
bool user_is_moderator(const std::string &name)
Returns true if this user is a moderator on this server.
GLuint const GLchar * name
void write_detail(const std::string &name, const std::string &detail, const std::string &value)
std::string get_mail(const std::string &user)
Used in send_mail().
void remove_user(const std::string &name)
Removes a user.
A config object defines a single node in a WML file, with access to child nodes.
std::string get_valid_details()
List of details that can be set for this user_handler.
GLsizei const GLcharARB ** string
std::string get_detail_for_user(const std::string &name, const std::string &detail)