WordPress.org

Make WordPress Core

Changeset 15328


Ignore:
Timestamp:
06/25/10 15:11:36 (7 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r15174 r15328  
    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.