summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-06-26 09:10:41 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-06-26 09:10:41 +0200
commit9eaf681b6be9e94b9e737eb2eaaa7272229334b1 (patch)
tree08eec5715852d6bdb8ee87aaebd7281fa66fbe34 /program
parent3aa16c320b9b0f0a0b91d61400cd25ea769a99a5 (diff)
Describe group filter's name_attr in sample config; defaults to 'cn' if not specified
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube_ldap.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index 54077c692..323dac3ce 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -88,7 +88,11 @@ class rcube_ldap extends rcube_addressbook
if (is_array($p['group_filters']) && count($p['group_filters'])) {
$this->groups = true;
- foreach ($p['group_filters'] as $group_filter) {
+ foreach ($p['group_filters'] as $k => $group_filter) {
+ // set default name attribute to cn
+ if (empty($group_filter['name_attr']) && empty($this->prop['groups']['name_attr']))
+ $this->prop['group_filters'][$k]['name_attr'] = $group_filter['name_attr'] = 'cn';
+
if ($group_filter['name_attr'])
$fetch_attributes[] = $group_filter['name_attr'];
}