X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0f29eadd474473203a1182f52af1aa82721cecbd..refs/tags/wordpress-3.3.1-scripts:/wp-register.php diff --git a/wp-register.php b/wp-register.php index ebf8e0c6..0b1a7697 100644 --- a/wp-register.php +++ b/wp-register.php @@ -1,161 +1,15 @@ 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.'); - $user_email = ''; - } - - if ( ! validate_username($user_login) ) { - $errors['user_login'] = __('ERROR: This username is invalid. Please enter a valid username.'); - $user_login = ''; - } - - if ( username_exists( $user_login ) ) - $errors['user_login'] = __('ERROR: This username is already registered, please choose another one.'); - - /* checking the email isn't already used by another user */ - $email_exists = $wpdb->get_row("SELECT user_email FROM $wpdb->users WHERE user_email = '$user_email'"); - if ( $email_exists) - die (__('ERROR: This email address is already registered, please supply another.')); - - if ( 0 == count($errors) ) { - $password = substr( md5( uniqid( microtime() ) ), 0, 7); - - $user_id = wp_create_user( $user_login, $password, $user_email ); - if ( !$user_id ) - $errors['user_id'] = sprintf(__('ERROR: Couldn’t register you... please contact the webmaster !'), get_settings('admin_email')); - else - wp_new_user_notification($user_id, $password); - } - - if ( 0 == count($errors) ) { - - ?> - - - - WordPress » <?php _e('Registration Complete') ?> - - - - - - -
-

-

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

-

»

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

WordPress

-

- -
- -
- -
-

-

-


-

-

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

-


- -

-
- - - - -