Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: I Need Help Writing A Custom Function to Redirect Non-Logged in Users.


foodin65
Participant

@foodin65

This is another Idea i have:

function bp_is_active( ‘profile’ || ‘activity’ || ‘messages’ || ‘friends’ || ‘groups’ || ‘settings’ ) && function_exists( ‘current_user_has_role’ ) && current_user_has_role( ‘subscriber’ || ‘moderator’ || ‘administrator’ ) {
global $bp;

if ( BP_ACTIVATION_SLUG == $bp->current_component )
return true;
if (wp_redirect(get_option(‘siteurl’) . ‘/wp-login.php’))
return false;
}

But again it doesn’t work…. am I even on the right track?

Skip to toolbar