@naplpm
11 years, 6 months ago
Hello,
@drill_sgtlewis, can you tell me how can I adapt this code to avoid non-logged user to get to a specific page?
I was trying something like this:
function restrict_access(){ global $bp, $bp_unfiltered_uri; $component = $bp->current_component;
if (!is_user_logged_in() && ($component == “events”) ) {
bp_core_redirect( “/home/” );
} }
add_action( ‘wp’, ‘restrict_access’, 3 );
But it didn’t worked.
Thanks