Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide members for other members

  • @delphy69

    Participant

    Hi,

    I will try to explain my problems, sorry I am french and I dont spaeck english as well.

    I find budypress this week, and It seems to be a good solution for my company.
    We would like to build a website, where some external employees can be registred and fill a form with their skills.
    By budypress, I find the way to create this plateform.

    In the same time, we must surch an external consultant. I have install the BP search profil, and it works good.

    All will be fine, but I would like that this external consultants will not be able to see other profiles.

    Is it possible to forbidden the access of the members profils to them ? only the administrator will have the right to see and surch all members, for exemple.

    Thanks for all your help

Viewing 1 replies (of 1 total)
  • @henrywright

    Moderator

    Hi @delphy69

    Try adding this to your theme’s functions.php file

    function hide_member_profiles() {
        if ( bp_is_user_profile() && ! current_user_can( 'manage_options' ) )
            bp_core_redirect( home_url() );
    }
    add_action( 'template_redirect', 'hide_member_profiles', 1 );
Viewing 1 replies (of 1 total)
  • The topic ‘Hide members for other members’ is closed to new replies.
Skip to toolbar