$valid = false; } if (mb_strtolower($logon) == mb_strtolower($password)) { $error_msg_array[] = gettext("Username and password must be different"); $valid = false; } } if ($valid) { if (user_exists($logon)) { $error_msg_array[] = gettext("Sorry, a user with that name already exists"); $valid = false; } } if ($valid) { $user_data = array('IPADDRESS' => get_ip_address(), 'REFERER' => session::get_http_referer(), 'LOGON' => $logon, 'NICKNAME' => $nickname, 'EMAIL' => $email); if (ban_check($user_data)) { $error_msg_array[] = gettext("The username or password you supplied is not valid."); $valid = false; } } if ($valid) { 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
// Disable PHP's magic quotes disable_magic_quotes(); // Correctly set server protocol set_server_protocol(); // Disable caching if on AOL cache_disable_aol(); // Disable caching if proxy server detected. cache_disable_proxy(); // Check that Beehive is installed correctly check_install(); // Multiple forum support require_once BH_INCLUDE_PATH . 'forum.inc.php'; // Initialise the session session::init(); // Perform ban check ban_check($_SESSION); // Check to see if user account has been banned. if (session::user_banned()) { light_html_user_banned(); exit; } // Check to see if the user has been approved. if (!session::user_approved()) { light_html_user_require_approval(); exit; } // Get the webtag for the current forum $webtag = get_webtag(); // Check we have a webtag and have access to the specified forum if (!forum_check_webtag_available($webtag) || !forum_check_access_level()) { $request_uri = rawurlencode(get_request_uri(false));