Login and Registration: Improve "email already exists" registration error message.
Adds the `wp_login_url()` login link to the Error message to be more helpful to users when their user email already is registered. Improves the error message to more clearly communicate next step. Follow-up to [16009], [22124], [31963]. Props andynick, costdev, dansoschin, sabernhardt, webcommsat. Fixes #53631. Built from https://develop.svn.wordpress.org/trunk@52074 git-svn-id: http://core.svn.wordpress.org/trunk@51666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -3110,7 +3110,14 @@ function register_new_user( $user_login, $user_email ) {
|
||||
$errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn’t correct.' ) );
|
||||
$user_email = '';
|
||||
} elseif ( email_exists( $user_email ) ) {
|
||||
$errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered. Please choose another one.' ) );
|
||||
$errors->add(
|
||||
'email_exists',
|
||||
sprintf(
|
||||
/* translators: %s: Link to the login page. */
|
||||
__( '<strong>Error:</strong> This email address is already registered. <a href="%s">Log in</a> with this address or choose another one.' ),
|
||||
wp_login_url()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user