From db71029a472fc40abfc62318564db727cb095103 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 17 Feb 2023 10:15:22 +0000 Subject: [PATCH] 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 --- wp-includes/user.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index e0cfae9188..96f9edfe04 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -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.' ) ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index c863cfda08..32b3cd1b5f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.