You are here

protected function OgSubscribe::assertOgMember in Organic groups 6.2

Assert the specified user is a member of the specified group.

Parameters

$account: User object.

$group: Group node object.

Return value

TRUE if user is a group member.

1 call to OgSubscribe::assertOgMember()
OgSubscribe::_testWebUserSubscribe in tests/og.subscribe.test
Test current user subscription to a group.

File

tests/og.subscribe.test, line 135

Class

OgSubscribe

Code

protected function assertOgMember($account, $group) {
  $vars = array(
    '%user' => theme('username', $account),
    '%group' => $group->title,
    '@selective' => $this->selective_labels[$group->og_selective],
  );
  $message = t('%user is a member of @selective group %group', $vars);
  return $this
    ->assertTrue($this
    ->_checkOgMembershipStatus($account, $group), $message);
}