Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding a particular user type as friend

  • Avatar of samm8158
    samm8158
    Participant

    @samm8158

    Hi there,
    I am creating a platform for searching the lawyer..In it the lawyer’s profile will be visible to everyone..In registration form I have a field called “Account type” containig 2 options viz. lawyer and client…The registration is open for clients and lawyers will have to pay…I want that if a person’s account type is a lawyer then he can add only “client” as a friend and not a lawyer and client can add only one lawyer..Is it possible with buddypress…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    That can be done via filters.

    For example, look at function bp_is_friend in buddypress\bp-friends\bp-friends-template.php

    For the members loop, you could use that filter to hook into a custom function that determines whether the members is a client or lawyer or already a friend and return true or false or empty depending on whether you want to show the add_friend button.

    Avatar of samm8158
    samm8158
    Participant

    @samm8158

    @shanebp

    Its nice to hear from you that’s possible in buddypress..Actually I am not a programmer…I know little bit of php and a plugin contains so much functions that I cannot write or understand such codes…So please tell me the code it would be a great help..I am just tired of finding a solution…You are the first one who gave me the solution

    Warm regards,

    Avatar of samm8158
    samm8158
    Participant

    @samm8158

    @shanebp

    Please help me out…Its really urgent..Due to some reason I could not reply you please help me out.

    Warm regards and great thanks,
    Sumit Agarwal

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

You must be logged in to reply to this topic.