function og_menu_check in Organic groups 5.7
Same name and namespace in other branches
- 5.8 og.module \og_menu_check()
- 5 og.module \og_menu_check()
- 5.2 og.module \og_menu_check()
- 5.3 og.module \og_menu_check()
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();
}
}