LDAP Auth: Make group loading really optional

fixes #7432
This commit is contained in:
Eric Lippmann 2014-10-23 03:46:49 +02:00
parent ba12d7b46c
commit f68c591a46

View File

@ -174,7 +174,10 @@ class LdapUserBackend extends UserBackend
$password $password
); );
if ($authenticated) { if ($authenticated) {
$user->setGroups($this->getGroups($userDn)); $groups = $this->getGroups($userDn);
if ($groups !== null) {
$user->setGroups($groups);
}
} }
return $authenticated; return $authenticated;
} catch (LdapException $e) { } catch (LdapException $e) {