Make WordPress Core

Changeset 16889


Ignore:
Timestamp:
12/13/2010 11:41:00 AM (11 years ago)
Author:
scribu
Message:

Prevent redundant wp_usermeta JOIN on single-site installs. See #14123

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/user.php

    r16858 r16889  
    470470        $blog_id = absint( $qv['blog_id'] );
    471471
    472         if ( $blog_id ) {
     472        if ( $role || ( is_multisite() && $blog_id ) ) {
    473473            $cap_meta_query = array();
    474474            $cap_meta_query['key'] = $wpdb->get_blog_prefix( $blog_id ) . 'capabilities';
Note: See TracChangeset for help on using the changeset viewer.