From 75478abd5cd48cdffef0c8e8eff70d4935a9b310 Mon Sep 17 00:00:00 2001 From: scribu Date: Mon, 13 Dec 2010 11:41:00 +0000 Subject: [PATCH] Prevent redundant wp_usermeta JOIN on single-site installs. See #14123 git-svn-id: http://svn.automattic.com/wordpress/trunk@16889 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index b28177fe6b..c8089447c2 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -469,7 +469,7 @@ class WP_User_Query { $role = trim( $qv['role'] ); $blog_id = absint( $qv['blog_id'] ); - if ( $blog_id ) { + if ( $role || ( is_multisite() && $blog_id ) ) { $cap_meta_query = array(); $cap_meta_query['key'] = $wpdb->get_blog_prefix( $blog_id ) . 'capabilities';