Changeset 5560
- Timestamp:
- 12/16/2011 04:17:14 PM (13 years ago)
- Location:
- trunk/bp-groups
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r5460 r5560 45 45 $this->total_member_count = groups_get_groupmeta( $this->id, 'total_member_count' ); 46 46 $this->is_member = BP_Groups_Member::check_is_member( bp_loggedin_user_id(), $this->id ); 47 48 // If this is a private or hidden group, does the current user have access? 49 if ( 'private' == $this->status || 'hidden' == $this->status ) { 50 if ( $this->is_member && is_user_logged_in() || bp_current_user_can( 'bp_moderate' ) ) 51 $this->user_has_access = true; 52 else 53 $this->user_has_access = false; 54 } else { 55 $this->user_has_access = true; 56 } 47 57 48 58 // Get group admins and mods -
trunk/bp-groups/bp-groups-filters.php
r5329 r5560 131 131 if ( bp_current_user_can( 'bp_moderate' ) ) 132 132 return true; 133 133 134 134 if ( 'add_tag_to' == $cap ) 135 135 if ( $bp->groups->current_group->user_has_access ) return true;
Note: See TracChangeset
for help on using the changeset viewer.