LSldapObject::loadData(): explicitly list need attributes in LDAP request

This commit is contained in:
Benjamin Renard 2020-09-21 12:45:39 +02:00
parent 9edfa2b92e
commit 5315005382

View file

@ -102,7 +102,7 @@ class LSldapObject extends LSlog_staticLoggerClass {
array ($filter, $additional_filter)
);
}
$data = LSldap :: getAttrs($dn, $filter);
$data = LSldap :: getAttrs($dn, $filter, array_keys($this -> attrs));
if(is_array($data) && !empty($data)) {
foreach($this -> attrs as $attr_name => $attr) {
if( !$this -> attrs[$attr_name] -> loadData( (isset($data[$attr_name])?$data[$attr_name]:NULL) ) )