WordPress.org

Make WordPress Core

Changeset 34996


Ignore:
Timestamp:
10/10/2015 01:41:43 AM (4 years ago)
Author:
jeremyfelt
Message:

MS: Show an error if a new site slug conflicts with an existing username.

Props utkarshpatel, dipesh.kakadiya.
Fixes #33804.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-new.php

    r34912 r34996  
    9191    $user_id = email_exists($email);
    9292    if ( !$user_id ) { // Create a new user with a random password
     93        $user_id = username_exists( $domain );
     94        if ( $user_id ) {
     95            wp_die( __( 'The domain or path entered conflicts with an existing username.' ) );
     96        }
    9397        $password = wp_generate_password( 12, false );
    9498        $user_id = wpmu_create_user( $domain, $password, $email );
Note: See TracChangeset for help on using the changeset viewer.