exit; } } } if (!isset($wanted_attrs[$KEY_FIELD])) { $wanted_attrs[$KEY_FIELD] = $KEY_FIELD; } // employeeType is only allowed on some eduPersonPrimaryAffiliation // departmentNumber is only useful for some eduPersonPrimaryAffiliation if (isset($wanted_attrs['employeeType']) || isset($wanted_attrs['departmentNumber'])) { $wanted_attrs['eduPersonPrimaryAffiliation'] = 'eduPersonPrimaryAffiliation'; } $allowExtendedInfo = 0; if (isset($showExtendedInfo) && GET_uid()) { if (isPersonMatchingFilter(GET_uid(), $LEVEL1_FILTER)) { if (isPersonMatchingFilter(GET_uid(), $LEVEL2_FILTER)) { $allowExtendedInfo = 2; } else { $allowExtendedInfo = 1; } } } if ($allowExtendedInfo >= 1) { $LDAP_CONNECT = $allowExtendedInfo == 2 ? $LDAP_CONNECT_LEVEL2 : $LDAP_CONNECT_LEVEL1; global_ldap_open('reOpen'); } // most attributes visibility are enforced using ACLs on LDAP bind // here are a few special cases if ($allowExtendedInfo < 1) { foreach (array('memberOf', 'memberOf-all') as $attr) { unset($wanted_attrs[$attr]);
function isStaffOrFaculty($uid) { return isPersonMatchingFilter($uid, staffFaculty_filter()); }