[wp-trac] [WordPress Trac] #60737: invalid_email or user_email ?
WordPress Trac
noreply at wordpress.org
Sun Mar 10 21:40:11 UTC 2024
#60737: invalid_email or user_email ?
------------------------------------+-------------------------------------
Reporter: juliobox | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Login and Registration | Version: trunk
Severity: minor | Keywords: needs-patch 2nd-opinion
Focuses: |
------------------------------------+-------------------------------------
Hey there,
I'm talking about login error keys.
Here are the 3 things we can find in the WP Core:
{{{#!php
<?php
$errors->add( 'invalid_email', __( '<strong>Error:</strong> There is no
account with that username or email address.' ) );
$errors->add( 'invalid_email', __( '<strong>Error:</strong> The email
address is not correct.' ) );
$errors->add( 'user_email', __( '<strong>Error:</strong> The email address
is not correct.' ), array('form-field' => 'email', ) );
}}}
The 1st is an error message when you try to login using an email address
that is not used as a user in this site, the key is "invalid_email"
The 2nd is an error message when you try to register a new user with an
email address that is not correctly formatted, the key is "invalid_email"
The 3rd is an error message when you try to update your personal profile
with an email address that is not correctly formatted, the key is
"user_email"
So we have 2 keys and 2 messages (like "A1 A2 B2", should be "A1 B2 B2")
but the message 2 is sharing both, we should clearly decide is
"invalid_email" is when the email does not exists in our site OR when the
email is not correctly formatted.
I suggest that the 2nd message should share the "user_email" and let the
"invalid_*" for the login stuff, like we already have "invalidcombo" or
"invalid_username" that shares the same kind of issue.
thanks for your reading time
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60737>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list