$v) { if (is_array($v)) { $array[$k] = add_magic_quotes($v); } else { $array[$k] = addslashes($v); } } return $array; } if (!get_magic_quotes_gpc()) { $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); } $wpvarstoreset = array('action'); for ($i=0; $iERROR: Please enter a login.'); } /* checking the password has been typed twice */ if ($pass1 == '' || $pass2 == '') { die ('ERROR: Please enter your password twice.'); } /* checking the password has been typed twice the same */ if ($pass1 != $pass2) { die ('ERROR: Please type the same password in the two password fields.'); } $user_nickname = $user_login; /* checking e-mail address */ if ($user_email == '') { die ('ERROR: Please type your e-mail address.'); } else if (!is_email($user_email)) { die ('ERROR: The email address isn’t correct.'); } /* checking the login isn't already used by another user */ $result = $wpdb->get_results("SELECT user_login FROM $tableusers WHERE user_login = '$user_login'"); if (count($result) >= 1) { die ('ERROR: This login is already registered, please choose another one.'); } $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'] ; $user_domain = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR'] ); $user_browser = $HTTP_SERVER_VARS['HTTP_USER_AGENT']; $user_login = addslashes($user_login); $pass1 = addslashes($pass1); $user_nickname = addslashes($user_nickname); $result = $wpdb->query("INSERT INTO $tableusers (user_login, user_pass, user_nickname, user_email, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_idmode) VALUES ('$user_login', '$pass1', '$user_nickname', '$user_email', '$user_ip', '$user_domain', '$user_browser', NOW(), '$new_users_can_blog', 'nickname')"); if ($result == false) { die ('ERROR: Couldn’t register you... please contact the webmaster !'); } $stars = ''; for ($i = 0; $i < strlen($pass1); $i = $i + 1) { $stars .= '*'; } $message = "New user registration on your blog $blogname:\r\n\r\n"; $message .= "Login: $user_login\r\n\r\nE-mail: $user_email"; @mail($admin_email, "[$blogname] New User Registration", $message); ?> WordPress » Registration Complete

Registration Complete

Login:
Password:
E-mail:

WordPress » Registration Currently Disabled

Registration Disabled

User registration is currently not allowed.
Home

WordPress » Registration Form

Registration




: