Restricting a group to members
-
Can anyone suggest a mod which will allow me to enter a group id which will restrict the group access only to members (of BP not the group)? Another topic had the following code whcih allows all groups and member pages to be restricted, can anyone suggest how I would modify it to be specific only to a particular group?
<?
function js_restrict_access(){
global $bp, $bp_unfiltered_uri;
if (!is_user_logged_in() &&
(BP_MEMBERS_SLUG == $bp_unfiltered_uri[0] ||
BP_GROUPS_SLUG == $bp->current_component ||
BP_BLOGS_SLUG == $bp->current_component)){
bp_core_redirect( get_option(‘home’) . “/register” );
}
add_action( ‘wp’, ‘js_restrict_access’, 3 );
?>
Thanks! I know that a privacy component is being developed, but if a simple mod can be suggested, it would be very helpful while we wait for the full functionality.
- The topic ‘Restricting a group to members’ is closed to new replies.