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:
parent
818e9581a8
commit
db71029a47
|
@ -2130,7 +2130,7 @@ function wp_insert_user( $userdata ) {
|
||||||
|
|
||||||
// Username must not match an existing user email.
|
// Username must not match an existing user email.
|
||||||
if ( email_exists( $user_login ) ) {
|
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.' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue