15 #ifndef SAMPLE_USER_HANDLER_HPP_INCLUDED
16 #define SAMPLE_USER_HANDLER_HPP_INCLUDED
58 is_moderator(false) {}
94 std::vector<std::string>
users();
97 #endif //SAMPLE_USER_HANDLER_HPP_INCLUDED
void set_mail(const std::string &user, const std::string &mail)
void check_mail(const std::string &mail)
bool user_is_moderator(const std::string &name)
Returns true if this user is a moderator on this server.
void clean_up()
Called by the server once a day.
bool login(const std::string &name, const std::string &password, const std::string &)
Return true if the given password matches the password for the given user.
std::string create_pepper(const std::string &)
Create custom salt.
void set_lastlogin(const std::string &user, const time_t &lastlogin)
An example of how to implement user_handler.
std::string get_valid_details()
List of details that can be set for this user_handler.
void check_realname(const std::string &realname)
void check_name(const std::string &name)
void password_reminder(const std::string &name)
Send a password reminder email to the given user.
std::map< std::string, user > users_
GLsizei const GLfloat * value
void set_realname(const std::string &user, const std::string &realname)
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)
void user_logged_in(const std::string &name)
Executed when the user with the given name logged in.
void set_password(const std::string &user, const std::string &password)
bool user_exists(const std::string &name)
Returns true if a user with the given name exists.
void check_password(const std::string &password)
std::vector< std::string > users()
std::string get_mail(const std::string &user)
Used in send_mail().
bool use_phpbb_encryption() const
Does this user_handler want passwords passed encrypted using phpbb's algorithm?
std::string get_password(const std::string &user)
GLuint const GLchar * name
void set_is_moderator(const std::string &name, const bool &is_moderator)
Mark this user as a moderator.
void set_user_detail(const std::string &user, const std::string &detail, const std::string &value)
Set data for a given user name.
bool user_is_active(const std::string &name)
Returns true if the specified user account is usable for logins.
std::string get_realname(const std::string &user)
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.
void add_user(const std::string &name, const std::string &mail, const std::string &password)
Adds a user.
GLsizei const GLcharARB ** string
std::string user_info(const std::string &name)
Returns a string containing info like the last login of this user.
time_t get_registrationdate(const std::string &user)