ERROR: Please enter a username.'); /* checking e-mail address */ if ($user_email == '') { $errors['user_email'] = __('ERROR: Please type your e-mail address.'); } else if (!is_email($user_email)) { $errors['user_email'] = __('ERROR: The email address isn’t correct.'); } if ( username_exists( $user_login ) ) $errors['user_login'] = __('ERROR: This username is already registered, please choose another one.'); $password = substr( md5( uniqid( microtime() ) ), 0, 7); $user_id = create_user( $user_login, $password, $user_email, 0 ); if ( !$user_id ) { $errors['user_id'] = sprintf(__('ERROR: Couldn’t register you... please contact the webmaster !'), get_settings('admin_email')); } if(count($errors) == 0) { $user = new WP_User($user_id); $user->set_role(get_settings('default_role')); do_action('user_register', $user_id); $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 Form') ?>

WordPress




A password will be emailed to you.

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