Skip to:
Content

BuddyPress.org

Changeset 10554


Ignore:
Timestamp:
02/08/2016 04:24:57 AM (5 years ago)
Author:
boonebgorges
Message:

Allow 'bp_moderate' users to get @-mention notifications from groups where they are not members.

See [10469] for the original introduction of the membership check.

Fixes #6842.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-filters.php

    r10469 r10554  
    301301 */
    302302function bp_groups_disable_at_mention_notification_for_non_public_groups( $send, $usernames, $user_id, BP_Activity_Activity $activity ) {
     303    // Skip the check for administrators, who can get notifications from non-public groups.
     304    if ( user_can( $user_id, 'bp_moderate' ) ) {
     305        return $send;
     306    }
     307
    303308    if ( 'groups' === $activity->component ) {
    304309        $group = groups_get_group( array( 'group_id' => $activity->item_id ) );
Note: See TracChangeset for help on using the changeset viewer.