Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Securing components from non logged in users


adamwiththehair
Participant

@adamwiththehair

I have this:

<?php

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

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

bp_core_redirect( $bp->root_domain );
}
}
add_action( 'wp', 'oci_restrict_access', 3 );

?>

But it still goes to the ASK page.

Am I doing something wrong?

Skip to toolbar