You are here

function og_menu_check in Organic groups 5.7

Same name and namespace in other branches
  1. 5.8 og.module \og_menu_check()
  2. 5 og.module \og_menu_check()
  3. 5.2 og.module \og_menu_check()
  4. 5.3 og.module \og_menu_check()
1 string reference to 'og_menu_check'
og_menu in ./og.module

File

./og.module, line 108

Code

function og_menu_check() {
  global $user;
  $args = func_get_args();
  $function = array_shift($args);
  $groups = array_keys($user->og_groups);
  if (user_access('administer nodes') || in_array($args[0], $groups)) {
    return call_user_func_array($function, $args);
  }
  else {
    drupal_access_denied();
  }
}