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

    <div class="item-list-tabs no-ajax" id="subnav">
    <ul>
    
    </ul>
    </div>
    <div class="profile">
    <?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 '<br><br>Oops! You must be friends with <div style="font-weight:bold">' . $bp->bp_options_title . '</div> to view this profile.<br>Click the "Add Friend" button above to request friendship.' . bp_add_friend_button();
    } else { ?>
    </div><!-- .profile -->

    Thanks in advance

  • The topic ‘Profile User – Restricted Access’ is closed to new replies.
Skip to toolbar