is_user_member_of_blog() [no args] should return true for logged in users on single site. $wpdb->blogid is 0, but the current blog ID isn't. Fixes #19160.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e0b10ef8a7
commit
4cf30f3410
|
@ -736,10 +736,8 @@ function is_user_member_of_blog( $user_id = 0, $blog_id = 0 ) {
|
||||||
if ( empty( $user_id ) )
|
if ( empty( $user_id ) )
|
||||||
$user_id = get_current_user_id();
|
$user_id = get_current_user_id();
|
||||||
|
|
||||||
if ( empty( $blog_id ) ) {
|
if ( empty( $blog_id ) )
|
||||||
global $wpdb;
|
$blog_id = get_current_blog_id();
|
||||||
$blog_id = $wpdb->blogid;
|
|
||||||
}
|
|
||||||
|
|
||||||
$blogs = get_blogs_of_user( $user_id );
|
$blogs = get_blogs_of_user( $user_id );
|
||||||
if ( is_array( $blogs ) )
|
if ( is_array( $blogs ) )
|
||||||
|
|
Loading…
Reference in New Issue