summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/group_ldap.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/group_ldap.php')
-rw-r--r--apps/user_ldap/group_ldap.php11
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();
}