Skip to content

Commit 5641404

Browse files
mr-svenfabpot
authored andcommitted
[Ldap] Fixing the behaviour of getting LDAP Attributes
1 parent 8c36347 commit 5641404

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Security/LdapUserProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function loadUserByIdentifier(string $identifier): UserInterface
7878
$this->ldap->bind($this->searchDn, $this->searchPassword);
7979
$identifier = $this->ldap->escape($identifier, '', LdapInterface::ESCAPE_FILTER);
8080
$query = str_replace(['{username}', '{user_identifier}'], $identifier, $this->defaultSearch);
81-
$search = $this->ldap->query($this->baseDn, $query);
81+
$search = $this->ldap->query($this->baseDn, $query, ['filter' => 0 == \count($this->extraFields) ? '*' : $this->extraFields]);
8282
} catch (ConnectionException $e) {
8383
$e = new UserNotFoundException(sprintf('User "%s" not found.', $identifier), 0, $e);
8484
$e->setUserIdentifier($identifier);

0 commit comments

Comments
 (0)