mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55360 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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.' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user