Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Redirect to Registration Page [“Plugin”]


21cdb
Participant

@21cdb

Can i enter this thread with a question:

I want my network only be visibe for logged in users. i put the following code in bp-custom.php but it leads to a redirct loop and i don’t see the mistake:

function restrict_access() {

global $bp, $bp_unfiltered_uri;

if (!is_user_logged_in() ) {
bp_core_redirect( $bp->root_domain . '/' . BP_REGISTER_SLUG );
}
}

add_action( 'wp', 'restrict_access', 3 );

Any hint for me?

Skip to toolbar