Skip to:

Re: Securing components from non logged in users

Burt Adsit


I don’t think it would be a major hack. More than likely you don’t even need to touch the core. bp looks for a bp-custom.php file in the /mu-plugins directory and if it exists it loads it before all else.

You could check the current component var in bp and see if they are logged in or not. Lemme go try something.

OK. I think I have a simple and quick solution for you. Something along the lines of this:

function oci_restrict_access(){

global $bp;

if ((MEMBERS_SLUG == $bp->current_component || BP_GROUPS_SLUG == $bp->current_component) && !is_user_logged_in()){

die(‘no access’);



add_action( ‘wp’, ‘oci_restrict_access’, 3 );

We can stick that in bp-custom.php. Gimme about a couple of hours to finish this and do some testing. I gotta pack up shop here and move to a different location at the moment.

Be back.

Skip to toolbar