[wp-trac] [WordPress Trac] #9568: Allow users to log in using their email address
WordPress Trac
noreply at wordpress.org
Tue Jan 20 15:27:38 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):
I discovered that the following part of the wp-login.php wasn't
considering the possibility of an email based login:
{{{
case 'login' :
default:
...
// If the user wants ssl but the session is not ssl, force a
secure cookie.
if ( !empty($_POST['log']) && !force_ssl_admin() ) {
$user_name = sanitize_user($_POST['log']);
if ( $user = get_user_by('login', $user_name) ) {
...
}}}
I updated the patch with a fix.
The {{{Undefined variable: username}}} in {{{wp_authenticate()}}} is also
fixed.
Newbie question: Could anyone give me a few pointers, as to what kind of
tests are necessary for the {{{wp_authenticate_email_password()}}}? I was
hoping there'd be a test case for
{{{wp_authenticate_username_password()}}} that I could bootstrap from.
Does it suffice to write some unit tests for {{{wp_authenticate()}}}?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/9568#comment:69>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list