Sponsorenverwaltung - Team StarCraft e.V.
 All Data Structures Files Functions Variables
User Class Reference

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...
 

Detailed Description

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.

Version
1.0.0
Author
UserCake (http://usercake.com)
Alexander Vorndran
Date
02.07.2013

Definition at line 37 of file class.newuser.php.

Constructor & Destructor Documentation

__construct (   $user,
  $first,
  $last,
  $pass,
  $email,
  $mobile 
)

Constructs a new user

Parameters
string$userthe username
string$firstthe firstname
string$lastthe lastname
string$passthe passwort
string$emailthe email
string$mobilethe mobile number
Author
Usercake http://www.usercake.com

Definition at line 79 of file class.newuser.php.

References $mobile, $username_taken, emailExists(), mobileExists(), sanitize(), and usernameExists().

+ Here is the call graph for this function:

Member Function Documentation

userCakeAddUser ( )

Adds the UserCake user to the database, gives initial permissions, sends mail and so on

Author
Usercake http://www.usercake.com
Alexander Vorndran

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.

+ Here is the call graph for this function:

Field Documentation

$activation_token = NULL

Holds the value of the activation token.

Definition at line 59 of file class.newuser.php.

$clean_email
private

Holds the value of the sanitized e-email-address.

Definition at line 41 of file class.newuser.php.

$clean_password
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.

$firstname = ""
private

Holds the firstname of the user.

Definition at line 65 of file class.newuser.php.

$lastname = ""
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.

$mobile = ""
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.

$username
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().


The documentation for this class was generated from the following file: