Re: Securing components from non logged in users
my original bp-customs.php still works fine for me on RC2… here it is:
<?
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 );
?>