diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/group_ldap.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index a5fc59d3b07..d2e69b4e12a 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -31,6 +31,7 @@ namespace OCA\user_ldap; use OCA\user_ldap\lib\Access; use OCA\user_ldap\lib\BackendUtility; +use OCA\user_ldap\lib\user\User; class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { protected $enabled = false; @@ -195,7 +196,11 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { return array(); } $seen[$DN] = 1; - $groups = $this->access->readAttribute($DN, 'memberOf'); + $user = $this->access->userManager->get($DN); + if(!$user instanceof User) { + return array(); + } + $groups = $user->getMemberOfGroups(); if (!is_array($groups)) { return array(); } |