Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Plugin: Force Login for Member Pages

Simple way from Burtadsit :)

<?

function oci_restrict_access(){
global $bp, $bp_unfiltered_uri;

if (!is_user_logged_in() &amp;&amp;
(BP_MEMBERS_SLUG == $bp_unfiltered_uri[0] ||
BP_GROUPS_SLUG == $bp->current_component )){

//bp_core_redirect( $bp->root_domain );
bp_core_redirect(get_bloginfo('siteurl') . '/register');
}
}
add_action( 'wp', 'oci_restrict_access', 3 );

?>

Trent

Skip to toolbar