[Plugin: BP Group Hierarchy] Problems with "request-membership" requests
-
BP Group Hierarchy 1.2.7
The “request membership” link wasn’t working for private subgroups in our installation. It would direct the user back to the group page with the “You do not have access to this group.” message. Here’s a diff of the one-liner that fixed it for me – but as usual I may have an insufficient understanding of the big picture:
Index: bp-groups-hierarchy-component.php =================================================================== --- bp-groups-hierarchy-component.php (revision 468709) +++ bp-groups-hierarchy-component.php (working copy) @@ -110,7 +110,7 @@ } // Group access control - if ( bp_is_groups_component() && !empty( $this->current_group ) && !empty( $bp->current_action ) && !$this->current_group->user_has_access ) { + if ( bp_is_groups_component() && !empty( $this->current_group ) && !empty( $bp->current_action ) && $bp->current_action != 'request-membership' && !$this->current_group->user_has_access ) { if ( is_user_logged_in() ) { // Off-limits to this user. Throw an error and redirect to the // group's home page @@ -166,4 +166,4 @@ } -?> \ No newline at end of file +?>
That fixes it for regular users. As an admin the request membership links give me a 404. Still working on that one.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘[Plugin: BP Group Hierarchy] Problems with "request-membership" requests’ is closed to new replies.