Skip to:
Content
Pages
Categories
Search
Top
Bottom

making users profiles, forums and activity private


  • Sofia Woods
    Participant

    @shortied

    Hi Folks – It’s come to our attention that the users pages are being indexed by google and are also visible to anyone who is not logged in.

    http://shortiedesigns.com/cpn/for-members/find-a-network-member/members/matt_parselle/

    I’ve done lots of googling and can’t quite find what I’m looking for.

    I need to make sure that everything about the user is private and only logged in members can see.

    I tried the below – but it only stopped the activity page – not the profile or forum page. I would love some clues if anyone has any! Thanks

    //Add a function to hide buddypress activity page from non-logged in users
    /* Prevent logged out users from accessing bp activity page */
    function nonreg_visitor_redirect() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bp_is_members_component() ||bp_is_page( BP_MEMBERS_SLUG ) ) {
    if(!is_user_logged_in()) { //just a visitor and not logged in
    wp_redirect( get_option(‘siteurl’) . ‘/wp-login.php’ );
    }
    }
    }
    add_filter(‘get_header’,’nonreg_visitor_redirect’,1);

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘making users profiles, forums and activity private’ is closed to new replies.
Skip to toolbar