Method | Description | |
---|---|---|
registerNewUser ( ) : boolean | Handles the entire registration process for DEFAULT users (not for people who register with 3rd party services, like facebook) and creates a new user in the database if everything is fine | |
registrationInputValidation ( $captcha, $user_name, $user_password_new, $user_password_repeat, $user_email, $user_email_repeat ) : boolean | Validates the registration input | |
rollbackRegistrationByUserId ( $user_id ) | Deletes the user from users table. Currently used to rollback a registration when verification mail sending was not successful. | |
sendVerificationEmail ( integer $user_id, string $user_email, string $user_activation_hash ) : boolean | Sends the verification email (to confirm the account). | |
validateUserEmail ( $user_email, $user_email_repeat ) : boolean | Validates the email | |
validateUserName ( $user_name ) : boolean | Validates the username | |
validateUserPassword ( $user_password_new, $user_password_repeat ) : boolean | Validates the password | |
verifyNewUser ( integer $user_id, string $user_activation_verification_code ) : boolean | checks the email/verification code combination and set the user's activation status to true in the database | |
writeNewUserToDatabase ( $user_name, $user_password_hash, $user_email, $user_creation_timestamp, $user_activation_hash ) : boolean | Writes the new user's data to the database |
public static registerNewUser ( ) : boolean | ||
return | boolean | Gives back the success status of the registration |
public static registrationInputValidation ( $captcha, $user_name, $user_password_new, $user_password_repeat, $user_email, $user_email_repeat ) : boolean | ||
$captcha | ||
$user_name | ||
$user_password_new | ||
$user_password_repeat | ||
$user_email | ||
$user_email_repeat | ||
return | boolean |
public static rollbackRegistrationByUserId ( $user_id ) | ||
$user_id |
public static sendVerificationEmail ( integer $user_id, string $user_email, string $user_activation_hash ) : boolean | ||
$user_id | integer | user's id |
$user_email | string | user's email |
$user_activation_hash | string | user's mail verification hash string |
return | boolean | gives back true if mail has been sent, gives back false if no mail could been sent |
public static validateUserEmail ( $user_email, $user_email_repeat ) : boolean | ||
$user_email | ||
$user_email_repeat | ||
return | boolean |
public static validateUserName ( $user_name ) : boolean | ||
$user_name | ||
return | boolean |
public static validateUserPassword ( $user_password_new, $user_password_repeat ) : boolean | ||
$user_password_new | ||
$user_password_repeat | ||
return | boolean |
public static writeNewUserToDatabase ( $user_name, $user_password_hash, $user_email, $user_creation_timestamp, $user_activation_hash ) : boolean | ||
$user_name | ||
$user_password_hash | ||
$user_email | ||
$user_creation_timestamp | ||
$user_activation_hash | ||
return | boolean |