Opened 3 years ago
Closed 3 years ago
#53631 closed enhancement (fixed)
Modify "email already exists" message upon registration
Reported by: | dansoschin | Owned by: | hellofromTonya |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Login and Registration | Keywords: | has-patch commit has-copy-review has-testing needs-unit-tests |
Focuses: | ui-copy | Cc: |
Description
I recently encountered this topic in the WordPress.org support forums:
https://wordpress.org/support/topic/that-email-address-is-already-in-use-please-try-again/
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 (4)
Change History (20)
#2
@
3 years 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
@
3 years 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
@
3 years 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 ) );
#5
@
3 years ago
- Keywords has-patch added; needs-patch removed
Using the wp_login_url()
function accommodates custom login URLs.
#6
@
3 years ago
- Keywords needs-testing needs-copy-review added
I had planned to include the prefix earlier:
Error: This email address is already registered. [Log in] with this address or choose another one.
I tested the login URL on single site, both with the standard wp-login.php and a custom login URL, plus a local multisite installation with the standard wp-login.php. It would be good to confirm that wp_login_url()
is correct for subdomain networks, too.
This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
#9
@
3 years ago
Test Report
Env
- WordPress 5.9-alpha-20211102.234109
- Chrome 95.0.4638.69
- Windows 10
- Theme: Twenty Twenty One
- Gutenberg Editor
- Plugins: None
Steps to test
- Visit the registration page:
/wp-login.php?action=register
. - Enter a unique username.
- Enter an email address used by an existing user.
- Apply patch 53631.1.diff.
- Repeat steps 1-3 to see the new text added by the patch.
Results
- Patch: 53631.1.diff
- Result: The patch correctly changes the words in the registration error. However, it may need some improvement. See before/after image posted below.
#10
@
3 years ago
- Keywords needs-copy-review removed
Copy review. The revised copy makes this clearer, and now with a single point of direction with the addition of the login link. Back to you @hellofromTonya
#11
@
3 years ago
- Keywords commit has-copy-review has-testing added; needs-testing removed
Thank you @webcommsat and @costdev for review and testing.
Marking for commit
.
#12
@
3 years ago
- Owner changed from sabernhardt to hellofromTonya
- Status changed from accepted to assigned
Reassigning review to me for commit.
#14
@
3 years ago
Thank you everyone for your contributions! The improved error message is now in Core and will ship with 5.9.
#15
@
3 years ago
- Keywords needs-unit-tests added
- Resolution fixed deleted
- Status changed from closed to reopened
The assertion in test_create_existing_network_user_on_sub_site_has_error()
for Multsite needs to be updated. Failing test here: https://github.com/WordPress/wordpress-develop/runs/4154138084?check_suite_focus=true .
@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.