Make WordPress Core


Ignore:
Timestamp:
11/09/2021 03:27:58 PM (5 years ago)
Author:
hellofromTonya
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r52064 r52074  
    31113111        $user_email = '';
    31123112    } elseif ( email_exists( $user_email ) ) {
    3113         $errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered. Please choose another one.' ) );
     3113        $errors->add(
     3114            'email_exists',
     3115            sprintf(
     3116                /* translators: %s: Link to the login page. */
     3117                __( '<strong>Error:</strong> This email address is already registered. <a href="%s">Log in</a> with this address or choose another one.' ),
     3118                wp_login_url()
     3119            )
     3120        );
    31143121    }
    31153122
Note: See TracChangeset for help on using the changeset viewer.