You are here

function og_webform_webform_results_access in Organic Groups Webform Integration 7

Same name and namespace in other branches
  1. 6 og_webform.module \og_webform_webform_results_access()

Implements hook_webform_results_access().

1 call to og_webform_webform_results_access()
og_webform_webform_results_clear_access in ./og_webform.module
Implements hook_webform_results_clear_access().

File

./og_webform.module, line 120
Enables organic group administrators to modify webforms within their groups.

Code

function og_webform_webform_results_access($node, $account = NULL) {

  // If this webform is not in a group, don't affect access.
  if (empty($node->group_audience['und'])) {
    return;
  }
  foreach ($node->group_audience['und'] as $group) {
    if (og_user_access($group['gid'], 'access all webform results', $account)) {
      return TRUE;
    }
  }
}