WordPress.org

Make WordPress Core

Ticket #33804: 33804.2.diff

File 33804.2.diff, 653 bytes (added by jeremyfelt, 6 years ago)
  • src/wp-admin/network/site-new.php

     
    8989        $password = 'N/A';
    9090        $user_id = email_exists($email);
    9191        if ( !$user_id ) { // Create a new user with a random password
     92                $user_id = username_exists( $domain );
     93                if ( $user_id ) {
     94                        wp_die( __( 'The domain or path entered conflicts with an existing username.' ) );
     95                }
    9296                $password = wp_generate_password( 12, false );
    9397                $user_id = wpmu_create_user( $domain, $password, $email );
    9498                if ( false === $user_id )