Make WordPress Core


Ignore:
Timestamp:
02/22/2016 11:14:27 PM (9 years ago)
Author:
ocean90
Message:

Authentication: Allow users to log in using their email address.

Introduces wp_authenticate_email_password() which is hooked into authenticate after wp_authenticate_username_password().

Props Denis-de-Bernardy, ericlewis, vhomenko, MikeHansenMe, swissspidy, ocean90.
Fixes #9568.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r36588 r36617  
    549549 * @since 2.5.0
    550550 *
    551  * @param string $username User's username.
     551 * @param string $username User's username or email address.
    552552 * @param string $password User's password.
    553553 * @return WP_User|WP_Error WP_User object if the credentials are valid,
     
    576576        // TODO what should the error message be? (Or would these even happen?)
    577577        // Only needed if all authentication handlers fail to return anything.
    578         $user = new WP_Error('authentication_failed', __('<strong>ERROR</strong>: Invalid username or incorrect password.'));
     578        $user = new WP_Error( 'authentication_failed', __( '<strong>ERROR</strong>: Invalid username, email address or incorrect password.' ) );
    579579    }
    580580
Note: See TracChangeset for help on using the changeset viewer.