Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to check group membership out of group loop?

  • @imjscn

    Participant

    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)
  • @etivite

    Member

    check_is_member is static and available anywhere within bp

    @imjscn

    Participant

    @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)
  • The topic ‘How to check group membership out of group loop?’ is closed to new replies.
Skip to toolbar