Make WordPress Core

Opened 3 months ago

Last modified 2 months ago

#53631 accepted enhancement

Modify "email already exists" message upon registration

Reported by: dansoschin Owned by: sabernhardt
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: Login and Registration Keywords: has-patch
Focuses: ui-copy Cc:


I recently encountered this topic in the WordPress.org support forums:


Therefore, I'm opening a feature request for the ability to edit/customize the system-generated messages through the front-end UI/settings in WordPress.

Currently, through the use of plugins, you can edit many of the system-generated emails to users, but not the on-screen messages.

Attachments (1)

53631.diff (1.5 KB) - added by sabernhardt 2 months ago.

Download all attachments as: .zip

Change History (6)

#1 @sabernhardt
3 months ago

  • Focuses accessibility removed

@dansoschin Thanks for the ticket!

I think adding the UI likely would be plugin territory. Branda facilitates editing login page errors, though I don't see the same for the signup page. The messages are at least customizable with the 'registration_errors' filter (in a custom plugin).

However, I agree with @andynick that including a link to the login page would be helpful when the user email is already registered. Perhaps this would belong on a separate ticket, unless it's better to change the direction of this one.

Single site email_exists message:
Error: This email is already registered. Please choose another one.

Multisite email_exists message:
Sorry, that email address is already used!

Suggestion to replace both:
Error: This email is already registered. [Log in] with this address or choose another one.

#2 @andynick
3 months ago

@sabernhardt I'm glad to see that you agree with me about the single site email message. Thank you for your interest.
I'm not familiar with these feature request tickets.
Your suggested new wording would be far more helpful.
Is there anything more I can do to help this along?
Thanks also to @dansoschin for posting this ticket.

#3 @dansoschin
2 months ago

  • Summary changed from Enable customization of system notices to Modify "email already exists" message upon registration

I concur that modifying the direction of the ticket per your suggestion makes the most sense and accomplishes the primary objective of the original author. Reserving further modification to custom plugins, etc., etc.

Having not modified a ticket previously, would you kindly let me know what I should do with the settings to accomplish this? (Or, if that's something I'm unable to do, but you or another contributor can do, that's also fine.) I went ahead and changed the summary to be more descriptive... just unsure if there are other properties that require changing.

Thank you!

#4 @sabernhardt
2 months ago

  • Focuses ui-copy added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.9
  • Owner set to sabernhardt
  • Severity changed from trivial to normal
  • Status changed from new to accepted
  • Type changed from feature request to enhancement
  • Version 5.7.2 deleted

If we switch direction to improving the default messages, then this is an enhancement with normal severity. Changing the summary was good. And I set the milestone to try for later this year.

I do not have a patch ready today. If someone else wants to create one before I do (and/or claim ownership of the ticket), you are welcome to do so.

I think the code would be similar to this in both files, though I expect it still needs some editing to work for any site (that does not override the message):

	$login_url = network_site_url( '/wp-login.php' );
	$errors->add( 'email_exists', sprintf( '<strong>Error</strong>: This email is already registered. <a href="%s">Log in</a> with this address or choose another one.', $login_url ) );

2 months ago

#5 @sabernhardt
2 months ago

  • Keywords has-patch added; needs-patch removed

Using the wp_login_url() function accommodates custom login URLs.

Note: See TracTickets for help on using tickets.