Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile User – Restricted Access

  • So I have edited my profile file a little bit to make it that you have to be a friend to view someones profile, but I am wanting to edit it again so that the admins, and whatever other level I need can view the profile still. Can any one show me what I need to add in?

    My current code is
    `

    <?php
    global $bp;
    $potential_friend_id = $bp->displayed_user->id;
    $friend_requester_id = $bp->loggedin_user->id;
    $friend_status = BP_Friends_Friendship::check_is_friend( $friend_requester_id, $potential_friend_id );
    if ( $friend_status != ‘is_friend’ && $potential_friend_id != $friend_requester_id) {
    echo ‘

    Oops! You must be friends with

    ‘ . $bp->bp_options_title . ‘

    to view this profile.
    Click the “Add Friend” button above to request friendship.’ . bp_add_friend_button();
    } else { ?>

    Thanks in advance

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Profile User – Restricted Access’ is closed to new replies.
Skip to toolbar