From 9eaf681b6be9e94b9e737eb2eaaa7272229334b1 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Wed, 26 Jun 2013 03:10:41 -0400 Subject: [PATCH] Describe group filter's name_attr in sample config; defaults to 'cn' if not specified --- program/lib/Roundcube/rcube_ldap.php | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php index 54077c6..323dac3 100644 --- a/program/lib/Roundcube/rcube_ldap.php +++ b/program/lib/Roundcube/rcube_ldap.php @@ -88,7 +88,11 @@ 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']; } -- Gitblit v1.9.1