15 #ifndef USER_HANDLER_HPP_INCLUDED
16 #define USER_HANDLER_HPP_INCLUDED
162 #endif //USER_HANDLER_HPP_INCLUDED
virtual void remove_user(const std::string &name)=0
Removes a user.
virtual bool use_phpbb_encryption() const =0
Does this user_handler want passwords passed encrypted using phpbb's algorithm?
virtual std::string get_mail(const std::string &user)=0
Used in send_mail().
virtual bool user_is_moderator(const std::string &name)=0
Returns true if this user is a moderator on this server.
virtual void set_user_detail(const std::string &user, const std::string &detail, const std::string &value)=0
Set data for a given user name.
virtual void add_user(const std::string &name, const std::string &mail, const std::string &password)=0
Adds a user.
virtual void clean_up()=0
Called by the server once a day.
bool send_mail(const std::string &to_user, const std::string &subject, const std::string &message)
Sends an email to the specified address.
GLuint GLsizei GLsizei * length
virtual void set_is_moderator(const std::string &name, const bool &is_moderator)=0
Mark this user as a moderator.
void init_mailer(const config &c)
Initiate the mailer object.
GLsizei const GLfloat * value
An interface class to handle nick registration To activate it put a [user_handler] section into the s...
virtual std::string user_info(const std::string &name)=0
Returns a string containing info like the last login of this user.
virtual bool user_exists(const std::string &name)=0
Returns true if a user with the given name exists.
std::string create_salt(int length=8)
Create a random string of digits for password encryption.
virtual bool user_is_active(const std::string &name)=0
Returns true if the specified user account is usable for logins.
virtual void password_reminder(const std::string &name)=0
Send a password reminder email to the given user.
GLuint const GLchar * name
virtual std::string get_valid_details()=0
List of details that can be set for this user_handler.
Base class for all the errors encountered by the engine.
error(const std::string &message)
virtual void user_logged_in(const std::string &name)=0
Executed when the user with the given name logged in.
GLsizei GLenum GLuint GLuint GLsizei char * message
virtual std::string create_pepper(const std::string &username)=0
Create custom salt.
A config object defines a single node in a WML file, with access to child nodes.
virtual bool login(const std::string &name, const std::string &password, const std::string &seed)=0
Return true if the given password matches the password for the given user.
GLsizei const GLcharARB ** string