Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Privacy options (friends only viewing)

Here’s what I did as a temporary solution (this is prob. not the best way, so I wouldnt recommend it). In each /theme/buddypress/plugin folder, for example /theme/buddypress/profile/index.php after div id=”content”> I added

<?php

global $bp, $wpmu;
$potential_friend_id = $bp['current_userid'];
$friend_status = BP_Friends_Friendship::check_is_friend( $bp['loggedin_userid'], $potential_friend_id );
if ( $friend_status != 'is_friend' && $potential_friend_id != $bp['loggedin_userid']) {
echo "You must be friends to view this profile.".bp_add_friend_button();
} else { ?>

then before the last </div> in the file i added

<?php } ?>

Skip to toolbar