- Timestamp:
- 11/07/2022 08:32:51 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-group-member-query.php
r13280 r13357 548 548 * 549 549 * @since 10.3.0 550 * @since 11.0.0 Include inactive users added by a community administrators to the group members count. 550 551 */ 551 552 public function populate_extras() { … … 555 556 556 557 // Validate active users. 557 $active_users = array_filter( BP_Core_User::get_last_activity( $this->user_ids ) ); 558 $active_user_ids = array_keys( $active_users ); 559 $this->results = array_intersect( $this->user_ids, $active_user_ids ); 558 if ( ! bp_current_user_can( 'bp_moderate' ) ) { 559 $active_users = array_filter( BP_Core_User::get_last_activity( $this->user_ids ) ); 560 $active_user_ids = array_keys( $active_users ); 561 $this->results = array_intersect( $this->user_ids, $active_user_ids ); 562 } else { 563 $this->results = $this->user_ids; 564 } 560 565 561 566 // Set the total active users.
Note: See TracChangeset
for help on using the changeset viewer.