Enable group sync for LDAP servers, that do not return memberOf (#5082)

This commit is contained in:
rdd2 2021-07-08 13:09:27 +02:00 committed by GitHub
parent b74b3799db
commit 78c8be71d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -578,7 +578,7 @@ class LDAP extends Base implements IAuthConnector
if ($ldap_is_connected) {
$this->lastAuthProperties['dn'] = $user_dn;
if ($this->ldapReadProperties) {
$sr = @ldap_read($this->ldapHandle, $user_dn, '(objectclass=*)');
$sr = @ldap_read($this->ldapHandle, $user_dn, '(objectclass=*)', ['*', 'memberOf']);
$info = @ldap_get_entries($this->ldapHandle, $sr);
if ($info['count'] != 0) {
foreach ($info[0] as $ldap_key => $ldap_value) {