Skip to:
Content
Pages
Categories
Search
Top
Bottom

Restrict friends on Buddypress


  • montanamind
    Participant

    @montanamind

    Hello, I’m hoping someone can help me or point me in the right direction. I am new to Buddypress (1.6.4) and WordPress (3.5.1). I was wondering if there is anyway in Buddypress to limit who a user can become friends with. For instance, a professor can be friends with anyone, students can be friends with each other and professors, and parents can only be friends with their child and professors. I have been doing quite a bit of research but haven’t found anything yet. Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    You can do that by easily filtering on this hook
    `
    bp_get_add_friend_button
    `
    If you can provide the code you are using to differentiate a user type(parents/student/professor), It will be super easy to put the complete code.


    montanamind
    Participant

    @montanamind

    I’m not quite sure how to do this. I was thinking of just creating another field in the profile and filling it in with either professor, student, or parent of student. Can I use this field to filter on? Am I making things more complicated or am I heading in the right direction? Thank you again in advance!


    Brajesh Singh
    Participant

    @sbrajesh

    I will suggest going via the user meta route. You can add a user meta to define type of user. that will give you a lot of flexibility in future while searching/listing users.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Restrict friends on Buddypress’ is closed to new replies.
Skip to toolbar