Skip to:
Content

BuddyPress.org

Changeset 8025


Ignore:
Timestamp:
03/03/2014 08:21:56 PM (10 years ago)
Author:
boonebgorges
Message:

Set WP_User_Query 'fields' param correctly based on multisite vs non-MS

See r8024, #5445

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-classes.php

    r8024 r8025  
    447447     */
    448448    public function do_wp_user_query() {
     449        $fields = array( 'ID', 'user_login', 'user_pass', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'user_activation_key', 'user_status', 'display_name' );
     450
     451        if ( is_multisite() ) {
     452            $fields[] = 'spam';
     453            $fields[] = 'deleted';
     454        }
     455
    449456        $wp_user_query = new WP_User_Query( apply_filters( 'bp_wp_user_query_args', array(
    450457
    451458            // Relevant
    452             'fields'      => array( 'ID', 'user_login', 'user_pass', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'user_activation_key', 'user_status', 'display_name', 'spam', 'deleted' ),
     459            'fields'      => $fields,
    453460            'include'     => $this->user_ids,
    454461
Note: See TracChangeset for help on using the changeset viewer.