$v) { if (is_array($v)) { $array[$k] = add_magic_quotes($v); } else { $array[$k] = addslashes($v); } } return $array; } if (!get_magic_quotes_gpc()) { $_GET = add_magic_quotes($_GET); $_POST = add_magic_quotes($_POST); $_COOKIE = add_magic_quotes($_COOKIE); } $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 $wpdb->users WHERE user_login = '$user_login'"); if (count($result) >= 1) { die (__('ERROR: This login is already registered, please choose another one.')); } $user_ip = $_SERVER['REMOTE_ADDR'] ; $user_browser = $wpdb->escape($_SERVER['HTTP_USER_AGENT']); $user_login = $wpdb->escape($user_login); $pass1 = $wpdb->escape($pass1); $user_nickname = $wpdb->escape($user_nickname); $now = gmdate('Y-m-d H:i:s'); $new_users_can_blog = get_settings('new_users_can_blog'); $result = $wpdb->query("INSERT INTO $wpdb->users (user_login, user_pass, user_nickname, user_email, user_ip, user_browser, dateYMDhour, user_level, user_idmode) VALUES ('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_browser', '$now', '$new_users_can_blog', 'nickname')"); if ($result == false) { die (sprintf(__('ERROR: Couldn’t register you... please contact the webmaster !'), get_settings('admin_email'))); } $stars = ''; for ($i = 0; $i < strlen($pass1); $i = $i + 1) { $stars .= '*'; } $message = sprintf(__("New user registration on your blog %1\$s:\n\nLogin: %2\$s \n\nE-mail: %3\$s"), get_settings('blogname'), $user_login, $user_email); @mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message); ?> WordPress » <?php _e('Registration Complete') ?>



WordPress » <?php _e('Registration Currently Disabled') ?>


WordPress » <?php _e('Registration Form') ?>




: