function og_activity_access_grants in Organic groups 6.2
Implementation of hook_activity_access_grants().
File
- includes/
og.activity.inc, line 36 - : Provides Activity module hooks for Organic groups.
Code
function og_activity_access_grants($account) {
$grants = array();
// Account is granted access to all activities within the groups account
// is a member of.
$groups = og_get_subscriptions($account->uid);
if (!empty($groups)) {
$grants['og_member'] = array_keys($groups);
}
return $grants;
}