World of Hello
|
the user (client) account. More...
#include <account.h>
Static Public Member Functions | |
static bool | isVerified () |
determine if the user has logged in. More... | |
static account | login (string account, string password, function func=null,...) |
log into an account using a password. More... | |
static account | create (string account, string email, function func=null,...) |
create an account. More... | |
static account | updatePassword (string account, string oldPassword, string newPassword) |
updates the password of the given account. More... | |
static account | forgotPassword (string account, string email) |
generates a new password for the given account. More... | |
static account | getEmail (string account="") |
gets the email of an account. More... | |
the user (client) account.
This class can be used for checking account information as well as logging in and creating a new account.
|
static |
create an account.
Create an account through the server using an account name and password. A server command "loginFailed" will be raised if there is a login error.\n WARNING: By using this function, users will be aware of a potentially insecure action.
The | new account name. |
The | new account email. |
(optional) | The function to trigger with the server response. |
(optional) | Any number of values to pass to the function, func, when invoked. |
|
static |
generates a new password for the given account.
Creates a new, random, email for the given account if the account exists and matches the given email. Emails the user with the newly created password.
The | account name. |
The | email of the account. |
|
static |
gets the email of an account.
Gets the email of the given account.\n WARNING: does not return the email. Instead, a server command starting with "getEmail" is caught.\n A server command of " getEmail"ERROR" " will be raised if there is an error trying to receive the email.
(optional) | The account to get the email of. If no account given, defaults to the logged in user. |
|
static |
determine if the user has logged in.
Check if the user has logged into a verified account.
|
static |
log into an account using a password.
Log the user into an account using an account name and password. The given function, func, is then triggered as an Event.Server.onCommand event and passed any additional arguments given.
The | user's account name. |
The | user's password. |
(optional) | The function to trigger with the server response. |
(optional) | Any number of values to pass to the function, func, when invoked. |
|
static |
updates the password of the given account.
Updates the password of an account, given an old password and a new password. A server command "updatePassword" will be raised with "success" if the new password was successfully created. Otherwise, it will be raised with some detailed error.\n WARNING: By using this function, users will be aware of a potentially insecure action.
The | account name to update the password. |
The | old password of the given account. |
The | new password to the given account. |