mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 06:29:30 +00:00
Fix is_site_admin() when passing a username. Props francescolaffi. fixes #14046 for 3.0.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.0@15329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0c7bfcea6b
commit
b3e3b51ece
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user