[wp-trac] [WordPress Trac] #9568: Allow users to log in using their email address
WordPress Trac
noreply at wordpress.org
Tue Jan 20 23:12:15 UTC 2015
#9568: Allow users to log in using their email address
-------------------------------------------------+-------------------------
Reporter: Denis-de-Bernardy | Owner:
Type: feature request | Status: assigned
Priority: normal | Milestone: 4.2
Component: Users | Version: 2.8
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs- | Focuses:
refresh needs-unit-tests |
-------------------------------------------------+-------------------------
Comment (by vhomenko):
Please review the unit tests.
Also, there is an UX issue: if the user enters a wrong email address at
the login screen, there are two error messages displayed:
{{{
ERROR: Invalid username. Lost your password?
ERROR: Invalid email address.
}}}
While the {{{wp_authenticate_email_password()}}} returns if the given
email doesn't validate, making {{{wp_authenticate_username_password()}}}
do a similar check seems non-trivial to me.
I'd propose using the {{{wp_login_errors}}} filter, that's applied in the
end of the wp-login.php, to purge the {{{'invalid_username'}}} entry, if
there is {{{'invalid_email'}}}, in the WP_Error object.
If that's acceptable, then where would be a good place to put the callback
function?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/9568#comment:70>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list