Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to check group membership out of group loop?

  • Avatar of imjscn
    imjscn
    Participant

    @imjscn

    Outside Groups component, if I want to check a user’s membership with a specific group_id,
    Should I use BP_Groups_Member::check_is_member( $user_id, $group_id )
    or should I use $bp->groups-> ....something ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • check_is_member is static and available anywhere within bp

    Avatar of imjscn
    imjscn
    Participant

    @imjscn

    @etivite , thanks!
    so, 2 database requiests will be done, once on groups page, another on another page. Is this ok for performence, or I’m creating extra burden for database?

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

You must be logged in to reply to this topic.