You are here

protected function OgSubscribe::_checkOgMembershipStatus in Organic groups 6.2

Check the group membership status of the specified user.

@todo Find a smarter way to test for group membership. Perhaps dependent on OG Views.

Parameters

$account: User object.

$group: Group node object.

Return value

TRUE if user is a group member.

2 calls to OgSubscribe::_checkOgMembershipStatus()
OgSubscribe::assertNotOgMember in tests/og.subscribe.test
Assert the specified user is not a member of the specified group.
OgSubscribe::assertOgMember in tests/og.subscribe.test
Assert the specified user is a member of the specified group.

File

tests/og.subscribe.test, line 181

Class

OgSubscribe

Code

protected function _checkOgMembershipStatus($account, $group) {
  return array_key_exists($group->nid, og_get_subscriptions($account->uid, 1, TRUE));
}