function ldapdata_category_access in LDAP integration 6
Checks if LDAP data category should be printed.
1 string reference to 'ldapdata_category_access'
- _ldapdata_user_categories in ./
ldapdata.module - Implements hook_user() categories operation.
File
- ./
ldapdata.module, line 139 - ldapdata provides data maping against ldap server.
Code
function ldapdata_category_access($account) {
global $user;
if (!($user->uid > 0 && $user->uid == $account->uid || user_access('administer users'))) {
return FALSE;
}
if (!isset($account->ldap_authentified)) {
return FALSE;
}
return _ldapdata_ldap_info($account, 'mapping_type') == LDAPDATA_MAP_ATTRIBUTES && count(_ldapdata_ldap_info($account, 'ldapdata_rwattrs')) > 0 ? TRUE : FALSE;
}