function space_og::og_is_group_admin in Spaces 7.3
Check if the user is a group administator.
Parameters
$group: Group entity.
$account: User entity.
1 call to space_og::og_is_group_admin()
- space_og::access_admin in spaces_og/
plugins/ space_og.inc - Override access_admin().
File
- spaces_og/
plugins/ space_og.inc, line 214
Class
- space_og
- Organic groups integration for Spaces.
Code
function og_is_group_admin($group, $account) {
$membership = og_get_group_membership($group->gid, 'user', $account->uid);
if (isset($membership->state) && $membership->state == OG_STATE_ACTIVE) {
return og_user_access($group->gid, 'manage group space', $account);
}
return FALSE;
}