From 24be09820747753c57cad0b171d940090ecf1c2b Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 25 Jun 2010 15:11:36 +0000 Subject: [PATCH] Fix is_site_admin() when passing a username. Props francescolaffi. fixes #14046 git-svn-id: http://svn.automattic.com/wordpress/trunk@15328 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-deprecated.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/ms-deprecated.php b/wp-includes/ms-deprecated.php index b607362832..4c3202d7c5 100644 --- a/wp-includes/ms-deprecated.php +++ b/wp-includes/ms-deprecated.php @@ -48,10 +48,10 @@ function is_site_admin( $user_login = '' ) { if ( !$user_id ) return false; } else { - $user = new WP_User( null, $user_login) ; - if ( empty( $user->id ) ) + $user = get_user_by( 'login', $user_login ); + if ( empty( $user->ID ) ) return false; - $user_id = $user->id; + $user_id = $user->ID; } return is_super_admin( $user_id );