Thomas Bruederli
2013-06-26 9eaf681b6be9e94b9e737eb2eaaa7272229334b1
Describe group filter's name_attr in sample config; defaults to 'cn' if not specified
2 files modified
8 ■■■■ changed files
config/main.inc.php.dist 2 ●●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_ldap.php 6 ●●●● patch | view | raw | blame | history
config/main.inc.php.dist
@@ -711,12 +711,14 @@
      'scope'   => 'list',
      'base_dn' => 'ou=Groups,dc=mydomain,dc=com',
      'filter'  => '(|(objectclass=groupofuniquenames)(objectclass=groupofurls))',
      'name_attr' => 'cn',
    ),
    'customers' => array(
      'name'    => 'Customers',
      'scope'   => 'sub',
      'base_dn' => 'ou=Customers,dc=mydomain,dc=com',
      'filter'  => '(objectClass=inetOrgPerson)',
      'name_attr' => 'sn',
    ),
  ),
);
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'];
            }