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
This commit is contained in:
parent
244ad8dd17
commit
75478abd5c
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue