$ldapConnection = $this->getConnection();
$this->bindSystemUser($ldapConnection);
+ // Clean attributes
+ foreach ($attributes as $index => $attribute) {
+ if (strpos($attribute, 'BIN;') === 0) {
+ $attributes[$index] = substr($attribute, strlen('BIN;'));
+ }
+ }
+
// Find user
$userFilter = $this->buildFilter($this->config['user_filter'], ['user' => $userName]);
$baseDn = $this->config['base_dn'];
$idAttr = $this->config['id_attribute'];
$emailAttr = $this->config['email_attribute'];
$displayNameAttr = $this->config['display_name_attribute'];
+ $thumbnailAttr = $this->config['thumbnail_attribute'];
$user = $this->getUserWithAttributes($userName, ['cn', 'dn', $idAttr, $emailAttr, $displayNameAttr]);
'name' => $this->getUserResponseProperty($user, $displayNameAttr, $userCn),
'dn' => $user['dn'],
'email' => $this->getUserResponseProperty($user, $emailAttr, null),
+ 'avatar'=> $this->getUserResponseProperty($user, $thumbnailAttr, null),
];
if ($this->config['dump_user_details']) {