Make WordPress Core


Ignore:
Timestamp:
02/17/2023 10:13:36 AM (20 months ago)
Author:
SergeyBiryukov
Message:

Users: Correct the error code in wp_insert_user() when login matches an existing email.

Move the test next to the other tests for user_login.

Follow-up to [55358].

See #57394.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r55358 r55360  
    21312131    // Username must not match an existing user email.
    21322132    if ( email_exists( $user_login ) ) {
    2133         return new WP_Error( 'existing_user_login_as_email', __( 'Sorry, that username is not available.' ) );
     2133        return new WP_Error( 'existing_user_email_as_login', __( 'Sorry, that username is not available.' ) );
    21342134    }
    21352135
Note: See TracChangeset for help on using the changeset viewer.