How to hide the friends tab from other users while displaying it to owner and admin only
I want to hide the “Friends” tab on the users profile page to all other users except for admin and owner of the profile only. I want this to work the way Messages and Settings tabs work => If another user types
`http: // [site] / [username] / messages`
BP shows an error message saying the user does not have access to the page.
If I use (with !bp_is_my_profile()),
it just shows a 404 type page for the `http: // [site] / [username] / friends`.
`$bp->bp_nav = false;`
but that doesn’t prevent the user from seeing the friends by going to `http: // [site] / [username] / friends`
I prevent the user from seeing the friends list by editing the members/home.php file. But, I’d like to use the same mechanism that settings and messages pages use.
I looked at messages/single.php, but didn’t see anything that could be taking care of this logic.
Can anybody help please?
The topic ‘How to hide the friends tab from other users while displaying it to owner and admin only’ is closed to new replies.