Make WordPress Core

Changeset 15329


Ignore:
Timestamp:
06/25/2010 03:12:29 PM (14 years ago)
Author:
ryan
Message:

Fix is_site_admin() when passing a username. Props francescolaffi. fixes #14046 for 3.0.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-includes/ms-deprecated.php

    r15174 r15329  
    4949            return false;
    5050    } else {
    51         $user = new WP_User( null, $user_login) ;
    52         if ( empty( $user->id ) )
     51        $user = get_user_by( 'login', $user_login );
     52        if ( empty( $user->ID ) )
    5353            return false;
    54         $user_id = $user->id;
     54        $user_id = $user->ID;
    5555    }
    5656
Note: See TracChangeset for help on using the changeset viewer.