adjust fetchList with a single requested attribute accordingly

This commit is contained in:
Arthur Schiwon 2015-10-09 20:07:35 +02:00
parent d127b3f0d2
commit e3a148584a

View file

@ -721,7 +721,9 @@ class Access extends LDAPUtility implements user\IUserTools {
return $list;
} else {
$list = array_reduce($list, function($carry, $item) {
$carry[] = $item[0];
$attribute = array_keys($item)[0];
$carry[] = $item[$attribute][0];
return $carry;
}, array());
return array_unique($list, SORT_LOCALE_STRING);
}