fix LDAP hydration with multi-value email field (#862)

This commit is contained in:
Jacob Blanco
2019-06-20 15:35:22 +02:00
committed by Kevin Papst
parent bdd05a275d
commit bb8572a364
2 changed files with 7 additions and 1 deletions

View File

@@ -63,6 +63,10 @@ class LdapUserHydrator
$this->hydrateUserWithAttributesMap($user, $ldapEntry, $attributeMap);
if (is_array($user->getEmail())) {
$user->setEmail($user->getEmail()[0]);
}
if (null === $user->getEmail()) {
$user->setEmail($user->getUsername());
}