An interface class to handle nick registration To activate it put a [user_handler] section into the server configuration file.
More...
#include <user_handler.hpp>
An interface class to handle nick registration To activate it put a [user_handler] section into the server configuration file.
Definition at line 30 of file user_handler.hpp.
user_handler::user_handler |
( |
| ) |
|
|
inline |
virtual user_handler::~user_handler |
( |
| ) |
|
|
inlinevirtual |
Adds a user.
Throws an error containing the error message if adding fails (e.g. because a user with the same name already exists).
Implemented in fuh, and suh.
virtual void user_handler::clean_up |
( |
| ) |
|
|
pure virtual |
Called by the server once a day.
Could for example be used for removing users that have not logged in for a certain amount of time.
Implemented in fuh, and suh.
Create custom salt.
If not needed let it return and empty string or whatever you feel like.
Implemented in suh, and fuh.
Create a random string of digits for password encryption.
Definition at line 40 of file user_handler.cpp.
References i.
virtual std::string user_handler::get_valid_details |
( |
| ) |
|
|
pure virtual |
void user_handler::init_mailer |
( |
const config & |
c | ) |
|
Return true if the given password matches the password for the given user.
Password could also be a hash Seed is not needed for clear text log ins Currently the login procedure in the server and client code is hardcoded for the forum_user_handler implementation
Implemented in fuh, and suh.
Send a password reminder email to the given user.
Should throw user_handler::error if sending fails (e.g. because we cannot send email).
Implemented in fuh, and suh.
Removes a user.
Throws an error containing the error message if removing fails (e.g. no user with the given name exists).
Implemented in fuh, and suh.
virtual void user_handler::set_is_moderator |
( |
const std::string & |
name, |
|
|
const bool & |
is_moderator |
|
) |
| |
|
pure virtual |
Mark this user as a moderator.
Implemented in fuh, and suh.
Set data for a given user name.
Should throw an error on invalid data.
Implemented in fuh, and suh.
virtual bool user_handler::use_phpbb_encryption |
( |
| ) |
const |
|
pure virtual |
Does this user_handler want passwords passed encrypted using phpbb's algorithm?
Let it return true if it does and false if it does not.
Implemented in fuh, and suh.
virtual bool user_handler::user_exists |
( |
const std::string & |
name | ) |
|
|
pure virtual |
Returns true if a user with the given name exists.
Implemented in fuh, and suh.
Referenced by send_mail().
Returns a string containing info like the last login of this user.
Formatted for user readable output.
Implemented in fuh, and suh.
virtual bool user_handler::user_is_active |
( |
const std::string & |
name | ) |
|
|
pure virtual |
Returns true if the specified user account is usable for logins.
Implemented in fuh, and suh.
virtual bool user_handler::user_is_moderator |
( |
const std::string & |
name | ) |
|
|
pure virtual |
Returns true if this user is a moderator on this server.
Implemented in fuh, and suh.
Executed when the user with the given name logged in.
Implemented in fuh, and suh.
The documentation for this class was generated from the following files: