if (($new_uid = user_create($logon, $password, $nickname, $email)) !== false) { // Save the new user preferences user_update_prefs($new_uid, $new_user_prefs); // Save the new user signature user_update_sig($new_uid, $sig_content, true); // Initialise the new user session. session::start($new_uid); // Update User's last forum visit forum_update_last_visit($new_uid); // Update the visitor log session::update_visitor_log($new_uid, true); // Check to see if the user is going somewhere after they have registered. $final_uri = isset($final_uri) ? rawurlencode($final_uri) : ''; // If User Confirmation is enabled send the forum owners an email. if (forum_get_setting('require_user_approval', 'Y')) { admin_send_user_approval_notification($new_uid); } // If New User Notification is enabled send the forum owners an email. if (forum_get_setting('send_new_user_email', 'Y')) { admin_send_new_user_notification($new_uid); } // Display final success / confirmation page. if (forum_get_setting('require_email_confirmation', 'Y')) { if (email_send_user_confirmation($new_uid)) { perm_user_apply_email_confirmation($new_uid); light_html_draw_top(array('title' => gettext("User Registration"))); light_navigation_bar(); light_html_display_msg(gettext("Successfully created user account"), gettext("Your user account has been created but before you can start posting you must confirm your email address. Please check your email for a link that will allow you to confirm your address."), 'index.php', 'get', array('continue' => gettext("Continue")), array('final_uri' => $final_uri)); light_html_draw_bottom(); exit; } else {
$valid = false; } } if ($valid) { if ($new_uid = user_create($logon, $password, $nickname, $email)) { // Save the new user preferences user_update_prefs($new_uid, $new_user_prefs); // Save the new user signature user_update_sig($new_uid, $sig_content, $sig_html); // Initialise the new user session. session::refresh($new_uid); // Check to see if the user is going somewhere after they have registered. $final_uri = isset($final_uri) ? rawurlencode($final_uri) : ''; // If User Confirmation is enabled send the forum owners an email. if (forum_get_setting('require_user_approval', 'Y')) { admin_send_user_approval_notification(); } // If New User Notification is enabled send the forum owners an email. if (forum_get_setting('send_new_user_email', 'Y')) { admin_send_new_user_notification($new_uid); } // Display final success / confirmation page. if (forum_get_setting('require_email_confirmation', 'Y')) { if (email_send_user_confirmation($new_uid)) { perm_user_apply_email_confirmation($new_uid); html_draw_top(sprintf("title=%s", gettext("User Registration"))); html_display_msg(gettext("Successfully created user account"), gettext("Your user account has been created but before you can start posting you must confirm your email address. Please check your email for a link that will allow you to confirm your address."), 'index.php', 'get', array('continue' => gettext("Continue")), array('final_uri' => $final_uri), '_top', 'center'); html_draw_bottom(); exit; } else { html_draw_top(sprintf("title=%s", gettext("User Registration")));