function _biblio_profile_access in Bibliography Module 7
Same name and namespace in other branches
- 6.2 biblio.module \_biblio_profile_access()
- 6 biblio.module \_biblio_profile_access()
- 7.2 biblio.module \_biblio_profile_access()
1 string reference to '_biblio_profile_access'
- biblio_menu in ./
biblio.module - Implements hook_menu().
File
- ./
biblio.module, line 2347 - Bibliography Module for Drupal.
Code
function _biblio_profile_access($user, $type = 'profile') {
if ($type == 'profile') {
$key = 'biblio_show_profile';
}
elseif ($type == 'menu' && !empty($user) && $user->uid > 0) {
$key = 'biblio_my_pubs_menu';
}
else {
return FALSE;
}
// If user cannot override site settings or user hasn't yet made its selection, we use site default.
if (!variable_get('biblio_show_user_profile_form', '1') || !isset($user->data[$key])) {
// Return site default.
return variable_get($key, '0');
}
else {
// Return user setting.
return $user->data[$key];
}
}