Make WordPress Core


Ignore:
Timestamp:
08/05/2011 04:57:31 PM (13 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-deprecated.php

    r14090 r18513  
    3737endif;
    3838
     39if ( !function_exists('get_userdatabylogin') ) :
     40/**
     41 * Retrieve user info by login name.
     42 *
     43 * @since 0.71
     44 * @deprecated 2.5
     45 * @deprecated Use get_user_by('login')
     46 *
     47 * @param string $user_login User's username
     48 * @return bool|object False on failure, User DB row object
     49 */
     50function get_userdatabylogin($user_login) {
     51    _deprecated_function( __FUNCTION__, '3.3', "get_user_by('login')" );
     52    return get_user_by('login', $user_login);
     53}
     54endif;
     55
     56if ( !function_exists('get_user_by_email') ) :
     57/**
     58 * Retrieve user info by email.
     59 *
     60 * @since 2.5
     61 * @deprecated 2.5
     62 * @deprecated Use get_user_by('email')
     63 *
     64 * @param string $email User's email address
     65 * @return bool|object False on failure, User DB row object
     66 */
     67function get_user_by_email($email) {
     68    _deprecated_function( __FUNCTION__, '3.3', "get_user_by('email')" );
     69    return get_user_by('email', $email);
     70}
     71endif;
     72
    3973if ( !function_exists('wp_setcookie') ) :
    4074/**
     
    5589function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
    5690    _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' );
    57     $user = get_userdatabylogin($username);
     91    $user = get_user_by('login', $username);
    5892    wp_set_auth_cookie($user->ID, $remember);
    5993}
Note: See TracChangeset for help on using the changeset viewer.