You are here

function variable_access in Variable 6

Same name and namespace in other branches
  1. 7.2 variable.module \variable_access()
  2. 7 variable.module \variable_access()

Check access to variable

1 string reference to 'variable_access'
variable_admin_menu in variable_admin/variable_admin.module
Implementation of hook_menu().

File

./variable.module, line 41
Variable API module

Code

function variable_access($name, $account = NULL) {
  $account = $account ? $account : $GLOBALS['user'];
  $variable = variable_info($name);
  return $variable && (!empty($variable['access']) && user_access($variable['access'], $account) || user_access('administer site configuration', $account));
}