Make WordPress Core


Ignore:
Timestamp:
01/20/2010 09:58:13 PM (16 years ago)
Author:
ryan
Message:

Add email and login dupe checking down into wp_insert_user(). Tidy up user-new.php. see #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r12776 r12778  
    12231223function wpmu_create_user( $user_name, $password, $email) {
    12241224    $user_name = preg_replace( "/\s+/", '', sanitize_user( $user_name, true ) );
    1225     if ( username_exists($user_name) )
     1225
     1226    $user_id = wp_create_user( $user_name, $password, $email );
     1227    if ( is_wp_error($user_id) )
    12261228        return false;
    12271229
    1228     // Check if the email address has been used already.
    1229     if ( email_exists($email) )
    1230         return false;
    1231 
    1232     $user_id = wp_create_user( $user_name, $password, $email );
    12331230    $user = new WP_User($user_id);
    12341231
Note: See TracChangeset for help on using the changeset viewer.