Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/05/2017 08:04:10 PM (9 years ago)
Author:
boonebgorges
Message:

Specify that group admin/mod queries should be blog-independent.

On Multisite, get_users() queries are limited to the current site, unless
otherwise specified. Since group membership is independent of WP site
roles/caps, we should opt out of this limitation.

Fixes #7497.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/groups/class-bp-groups-group.php

    r11523 r11526  
    14491449
    14501450        /**
     1451         * @ticket BP7497
     1452         */
     1453        public function test_admins_property_should_match_users_without_wp_role() {
     1454                $user_1 = $this->factory->user->create_and_get();
     1455                $g = $this->factory->group->create( array(
     1456                        'creator_id' => $user_1->ID,
     1457                ) );
     1458
     1459                $user_1->remove_all_caps();
     1460
     1461                $group = new BP_Groups_Group( $g );
     1462
     1463                $this->assertEqualSets( array( $user_1->ID ), wp_list_pluck( $group->admins, 'user_id' ) );
     1464        }
     1465
     1466        /**
    14511467         * @ticket BP5451
    14521468         */
Note: See TracChangeset for help on using the changeset viewer.