You are here

function og_menu_check_node_view in Organic groups 5.7

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

File

./og.module, line 124

Code

function og_menu_check_node_view() {
  global $user;
  $args = func_get_args();
  $function = array_shift($args);
  $gid = $args[0];
  $node = node_load((int) $gid);
  if (node_access('view', $node)) {
    return call_user_func_array($function, $args);
  }
  else {
    drupal_access_denied();
  }
}