Skip to content
Snippets Groups Projects
Commit b4800719 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

group LDAP: implemented getUserGroups()

parent 0912f40e
Branches
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment