summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/group_ldap.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-08-26 15:17:46 +0200
committerArthur Schiwon <blizzz@owncloud.com>2015-09-23 16:38:39 +0200
commit845485cfe637c3a7fdb72a110cb68c769b2f8d4b (patch)
treeb88e33f1df7d016c9942615460b0ee0325340ce2 /apps/user_ldap/group_ldap.php
parent9d03b7c6b7131761f29f79e6c33473b0ca483856 (diff)
downloadnextcloud-server-845485cfe637c3a7fdb72a110cb68c769b2f8d4b.tar.gz
nextcloud-server-845485cfe637c3a7fdb72a110cb68c769b2f8d4b.zip
adjust to nested group fix
Diffstat (limited to 'apps/user_ldap/group_ldap.php')
-rw-r--r--apps/user_ldap/group_ldap.php7
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();
}