WordPress.org

Make WordPress Core

Changeset 18513 for trunk/wp-login.php


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-login.php

    r18504 r18513  
    172172
    173173    if ( strpos($_POST['user_login'], '@') ) {
    174         $user_data = get_user_by_email(trim($_POST['user_login']));
     174        $user_data = get_user_by('email', trim($_POST['user_login']));
    175175        if ( empty($user_data) )
    176176            $errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));
    177177    } else {
    178178        $login = trim($_POST['user_login']);
    179         $user_data = get_userdatabylogin($login);
     179        $user_data = get_user_by('login', $login);
    180180    }
    181181
     
    545545    if ( !empty($_POST['log']) && !force_ssl_admin() ) {
    546546        $user_name = sanitize_user($_POST['log']);
    547         if ( $user = get_userdatabylogin($user_name) ) {
     547        if ( $user = get_user_by('login', $user_name) ) {
    548548            if ( get_user_option('use_ssl', $user->ID) ) {
    549549                $secure_cookie = true;
Note: See TracChangeset for help on using the changeset viewer.