WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/05/2011 04:57:31 PM (9 years ago)
Author:
ryan
Message:

Deprecate get_userdatabylogin() and get_user_by_email(). Props scribu. fixes #18333

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:mergeinfo changed
      /trunk (added)merged: 18512
  • trunk/wp-includes/pluggable.php

    r18504 r18513  
    200200
    201201    return $user;
    202 }
    203 endif;
    204 
    205 if ( !function_exists('get_userdatabylogin') ) :
    206 /**
    207  * Retrieve user info by login name.
    208  *
    209  * @since 0.71
    210  *
    211  * @param string $user_login User's username
    212  * @return bool|object False on failure, User DB row object
    213  */
    214 function get_userdatabylogin($user_login) {
    215     return get_user_by('login', $user_login);
    216 }
    217 endif;
    218 
    219 if ( !function_exists('get_user_by_email') ) :
    220 /**
    221  * Retrieve user info by email.
    222  *
    223  * @since 2.5
    224  *
    225  * @param string $email User's email address
    226  * @return bool|object False on failure, User DB row object
    227  */
    228 function get_user_by_email($email) {
    229     return get_user_by('email', $email);
    230202}
    231203endif;
     
    595567    }
    596568
    597     $user = get_userdatabylogin($username);
     569    $user = get_user_by('login', $username);
    598570    if ( ! $user ) {
    599571        do_action('auth_cookie_bad_username', $cookie_elements);
Note: See TracChangeset for help on using the changeset viewer.