81 $this->clean_email =
sanitize($email);
82 $this->clean_password = trim($pass);
87 $this->firstname = $first;
88 $this->lastname = $last;
95 $new_username = $this->username.rand(1000,9999);
97 $this->username = $new_username;
103 $this->username_taken =
true;
111 $this->email_taken =
true;
113 $this->mobile_taken =
true;
135 $this->user_active = 0;
144 $activation_message =
lang(
"ACCOUNT_ACTIVATION_MESSAGE", array($websiteUrl, $this->activation_token));
148 "searchStrs" => array(
"#ACTIVATION-MESSAGE#",
"#ACTIVATION-KEY",
"#USERNAME#"),
149 "subjectStrs" => array($activation_message, $this->activation_token, $this->username)
154 if (!$mail->newTemplateMsg(
"new-registration.txt", $hooks)) {
155 $this->mail_failure =
true;
159 if (!$mail->sendMail($this->clean_email,
'Neues Benutzerkonto')) {
160 $this->mail_failure =
true;
164 if (!$this->mail_failure) {
167 $stmt = $mysqli->prepare(
"INSERT INTO " . $db[
'users'] .
" (
175 last_activation_request,
176 lost_password_request,
199 $stmt->bind_param(
"sssssssii", $this->username, $this->firstname, $this->lastname, $secure_pass, $this->clean_email, $this->mobile, $this->activation_token, $this->user_active, $mailValid);
201 $inserted_id = $mysqli->insert_id;
210 $stmt = $mysqli->prepare(
"INSERT INTO " . $db[
'user_permission'] .
" (
217 $stmt->bind_param(
"ss", $inserted_id, $default_permission);
222 $stmt = $mysqli->prepare(
"UPDATE " . $db[
'users'] .
" SET active = '1', title = 'Administrator'
232 $this->success =
lang(
"ACCOUNT_REGISTRATION_COMPLETE_TYPE3", array($this->username));