Skip to:
Content
Pages
Categories
Search
Top
Bottom

Help me with this profile privacy script

  • Avatar of Baconbits
    Baconbits
    Participant

    @seriousdon

    Hello, I have this code here that I’ve been using to keep profiles private to non-friends (admin overrides this).

    I would also like to allow editors to have access to user profiles/streams for moderation purposes. Is there any way to implement that? Here is the code:

    `// ——- Check if member is a friend ————- //

    function bp_displayed_user_is_friend() {
    global $bp;
    if ( bp_is_profile_component() || bp_is_member() ) {
    if ( (‘is_friend’ != BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $bp->displayed_user->id )) && (bp_loggedin_user_id() != bp_displayed_user_id()) )
    if ( !is_super_admin( bp_loggedin_user_id() ) )

    return true;
    }
    }`

    Is there an is_editor function I can use to give editors access?

You must be logged in to reply to this topic.