$u->setEmail($email); $user = $u->getByEmail(); if ($user instanceof User) { array_push($errors, $LNG->FORM_ERROR_EMAIL_USED); } else { // only create user if no error so far // create new user $u->add($email, $fullname, $password, $homepage, 'N', $CFG->AUTH_TYPE_EVHUB, $description, $CFG->USER_STATUS_UNVALIDATED); $u->updatePrivate($privatedata); $u->updateLocation($location, $loccountry); // Recent Activities Email if ($CFG->RECENT_EMAIL_SENDING_ON) { $u->updateRecentActivitiesEmail($recentactivitiesemail); } //send email to welcome $paramArray = array($fullname, $CFG->SITE_TITLE, $CFG->homeAddress, $u->userid, $u->getRegistrationKey(), $password); sendMail("validateadmin", $LNG->WELCOME_REGISTER_CLOSED_SUBJECT, $email, $paramArray); if (empty($errors)) { echo "<h1>" . $LNG->REGISTRATION_REQUEST_SUCCESSFUL_TITLE_ADMIN . "</h1>"; echo "<p>" . $LNG->REGISTRATION_REQUEST_SUCCESSFUL_MESSAGE_ADMIN . "<p><br><br>"; echo '<div class="formrow">'; echo '<input type="button" value="' . $LNG->FORM_BUTTON_CLOSE . '" onclick="window.close();"/>'; echo '</div>'; include_once $HUB_FLM->getCodeDirPath("ui/footerdialog.php"); die; } } } } } $countries = getCountryList();
if ($recaptcha_response_field == "" || !$resp->is_valid) { array_push($errors, $LNG->FORM_ERROR_CAPTCHA_INVALID); } } if (empty($errors)) { // only create user if no error so far // create new user $u->add($email, $fullname, $password, $homepage, 'N', $CFG->AUTH_TYPE_EVHUB, $description, $CFG->USER_STATUS_UNVALIDATED); $u->updatePrivate($privatedata); $u->updateLocation($location, $loccountry); // Recent Activities Email if ($CFG->RECENT_EMAIL_SENDING_ON) { $u->updateRecentActivitiesEmail($recentactivitiesemail); } // send validation email $paramArray = array($u->name, $CFG->SITE_TITLE, $CFG->homeAddress, $u->userid, $u->getRegistrationKey()); sendMail("validate", $LNG->VALIDATE_REGISTER_SUBJECT, $u->getEmail(), $paramArray); // too large a photo can cause this to fail, so it should send the email before it // tries to process the image. This should not prevent the registration process. $photofilename = ""; if (empty($errors)) { // upload image if provided if ($_FILES['photo']['tmp_name'] != "") { // Can't upload photo without userid $USER = $u; $photofilename = uploadImage('photo', $errors, $CFG->IMAGE_WIDTH); if (!empty($errors)) { echo "<div class='errors'>"; foreach ($errors as $error) { echo $error; }