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.
Built from https://develop.svn.wordpress.org/trunk@55360


git-svn-id: http://core.svn.wordpress.org/trunk@54893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-02-17 10:15:22 +00:00
parent 818e9581a8
commit db71029a47
2 changed files with 2 additions and 2 deletions

View File

@ -2130,7 +2130,7 @@ function wp_insert_user( $userdata ) {
// Username must not match an existing user email.
if ( email_exists( $user_login ) ) {
return new WP_Error( 'existing_user_login_as_email', __( 'Sorry, that username is not available.' ) );
return new WP_Error( 'existing_user_email_as_login', __( 'Sorry, that username is not available.' ) );
}
/**

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-beta2-55359';
$wp_version = '6.2-beta2-55360';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.