This class handles some of the main tasks of creating a new user. More...
Public Member Functions | |
__construct ($user, $first, $last, $pass, $email, $mobile) | |
userCakeAddUser () | |
Data Fields | |
$user_active = 0 | |
0 means the user has to be activated by an administrator More... | |
$status = false | |
Is TRUE if no errors occurred. More... | |
$sql_failure = false | |
TRUE if an SQL-error occurred FALSE if not. More... | |
$mail_failure = false | |
TRUE if an error occured during sending the mail FALSE if not. More... | |
$email_taken = false | |
TRUE if the e-mail is already used by another user. More... | |
$username_taken = false | |
TRUE if there is an user with the same username. More... | |
$mobile_taken = false | |
TRUE if there is an user with the same mobile number. More... | |
$activation_token = NULL | |
Holds the value of the activation token. More... | |
$success = NULL | |
Holds success messages. More... | |
Private Attributes | |
$clean_email | |
Holds the value of the sanitized e-email-address. More... | |
$clean_password | |
holds the sanitized password value More... | |
$username | |
Holds the username. More... | |
$mobile = "" | |
Holds the mobile number of the user. More... | |
$firstname = "" | |
Holds the firstname of the user. More... | |
$lastname = "" | |
Holds the lastname of the user. More... | |
This class handles some of the main tasks of creating a new user.
This class is based on the class User from UserCake Version 2.0.2.
This class depends on inc/common.php.
Definition at line 37 of file class.newuser.php.
__construct | ( | $user, | |
$first, | |||
$last, | |||
$pass, | |||
$email, | |||
$mobile | |||
) |
Constructs a new user
string | $user | the username |
string | $first | the firstname |
string | $last | the lastname |
string | $pass | the passwort |
string | the email | |
string | $mobile | the mobile number |
Definition at line 79 of file class.newuser.php.
References $mobile, $username_taken, emailExists(), mobileExists(), sanitize(), and usernameExists().
userCakeAddUser | ( | ) |
Adds the UserCake user to the database, gives initial permissions, sends mail and so on
Definition at line 125 of file class.newuser.php.
References $db, $mysqli, $successes, $websiteUrl, addPermission(), ADMIN_PERMISSION, DEFAULT_ADMIN_ACCOUNT, generateActivationToken(), generateImprovedHash(), lang(), NEW_USER_TITLE, resetValidMail(), setUserIDIncrement(), and STANDARD_PERMISSION.
$activation_token = NULL |
Holds the value of the activation token.
Definition at line 59 of file class.newuser.php.
|
private |
Holds the value of the sanitized e-email-address.
Definition at line 41 of file class.newuser.php.
|
private |
holds the sanitized password value
Definition at line 45 of file class.newuser.php.
$email_taken = false |
TRUE if the e-mail is already used by another user.
Definition at line 53 of file class.newuser.php.
|
private |
Holds the firstname of the user.
Definition at line 65 of file class.newuser.php.
|
private |
Holds the lastname of the user.
Definition at line 67 of file class.newuser.php.
$mail_failure = false |
TRUE if an error occured during sending the mail FALSE if not.
Definition at line 51 of file class.newuser.php.
|
private |
Holds the mobile number of the user.
Definition at line 63 of file class.newuser.php.
Referenced by __construct().
$mobile_taken = false |
TRUE if there is an user with the same mobile number.
Definition at line 57 of file class.newuser.php.
$sql_failure = false |
TRUE if an SQL-error occurred FALSE if not.
Definition at line 49 of file class.newuser.php.
$status = false |
Is TRUE if no errors occurred.
Definition at line 43 of file class.newuser.php.
$success = NULL |
Holds success messages.
Definition at line 61 of file class.newuser.php.
$user_active = 0 |
0 means the user has to be activated by an administrator
Definition at line 39 of file class.newuser.php.
|
private |
Holds the username.
Definition at line 47 of file class.newuser.php.
$username_taken = false |
TRUE if there is an user with the same username.
Definition at line 55 of file class.newuser.php.
Referenced by __construct().