diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-04-15 13:56:14 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-04-15 14:50:03 +0200 |
commit | b48007194671de331c3757d1ade210a4af0f8c59 (patch) | |
tree | 947c01d125a4750f656b1628ea2a02e18875d645 | |
parent | 0912f40ebe074ce31263af1856222ff607f8bc6b (diff) | |
download | nextcloud-server-b48007194671de331c3757d1ade210a4af0f8c59.tar.gz nextcloud-server-b48007194671de331c3757d1ade210a4af0f8c59.zip |
group LDAP: implemented getUserGroups()
-rw-r--r-- | apps/user_ldap/group_ldap.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 4702d69daba..92bc59c0def 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -65,6 +65,17 @@ class OC_GROUP_LDAP extends OC_Group_Backend { * if the user exists at all. */ public function getUserGroups($uid) { + $filter = OC_LDAP::combineFilterWithAnd(array( + $this->ldapGroupFilter, + LDAP_GROUP_MEMBER_ASSOC_ATTR.'='.$uid + )); + $groups = OC_LDAP::search($filter, $this->ldapGroupDisplayName); + + if(is_array($groups)) { + return $groups; + } + + //error cause actually, maybe throw an exception in future. return array(); } |