ERROR: Please enter a username.')); /* 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.')); } if ( $result = $wpdb->get_row("SELECT user_login FROM $wpdb->users WHERE user_login = '$user_login'") ) die (__('ERROR: This username is already registered, please choose another one.')); $user_login = $wpdb->escape( sanitize_user($user_login) ) ); $user_nicename = sanitize_title($user_nickname); $now = gmdate('Y-m-d H:i:s'); $user_level = get_settings('new_users_can_blog'); $password = substr( md5( uniqid( microtime() ) ), 0, 7); $result = $wpdb->query("INSERT INTO $wpdb->users (user_login, user_pass, user_email, user_registered, user_level, user_nicename) VALUES ('$user_login', MD5('$password'), '$user_email', '$now', '$user_level', '$user_nicename')"); do_action('user_register', $wpdb->insert_id); 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(__('Username: %s'), $user_login) . "\r\n"; $message .= sprintf(__('Password: %s'), $password) . "\r\n"; $message .= get_settings('siteurl') . "/wp-login.php\r\n"; wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_settings('blogname')), $message); $message = sprintf(__('New user registration on your blog %s:'), get_settings('blogname')) . "\r\n\r\n"; $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n"; @wp_mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message); ?> WordPress » <?php _e('Registration Complete') ?>

$user_login") ?>
' . __('emailed to you') . '') ?>
$user_email") ?>

»

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


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

WordPress




A password will be emailed to you.