[Tickets #13945] Autocomplete with custom parameter not working for LDAP

noreply at bugs.horde.org noreply at bugs.horde.org
Fri Apr 10 12:35:24 UTC 2015


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/13945
------------------------------------------------------------------------------
  Ticket             | 13945
  Created By         | asa at isac.gov.in
  Summary            | Autocomplete with custom parameter not working for LDAP
  Queue              | Turba
  Version            | 4.2.5
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


asa at isac.gov.in (2015-04-10 12:35) wrote:

I have recently installed latest stable version of HGWE and testing it.

Autocomplete is not working for one of the attribute which I have
mentioned in search under LDAP.

for IMP, prefs.local.php, I have set

$_prefs['search_sources']['hook'] = true;
$_prefs['search_fields']['hook'] = true;
$_prefs['add_source']['hook'] = true;

enabled the hooks in imp/hooks.local.php


for turba,

turba/attributes.local.php (the file contains additional attribute,
which is refereed in LDAP)

<?php
$attributes['staffno'] = array(
      'label' => _("StaffNumber"),
      'type' => 'text',
      'required' => false,
      'params' => array('regex' => '', 'size' => 32, 'maxlength' => 32)
);

$attributes['postalAddress'] = array(
      'label' => _("Postal Address"),
      'type' => 'text',
      'required' => false,
);

$attributes['cn'] = array(
      'label' => _("Complete Name"),
      'type' => 'text',
      'required' => false,
);


turba/backends.local.php

<?php
$cfgSources['localsql']['title'] = 'My Address Book';
$cfgSources['localsql']['use_shares'] = false;
$cfgSources['localldap']['disabled'] = false;
$cfgSources['localldap']['title'] = 'LDAP Directory';
$cfgSources['localldap']['params']['server'] = 'xxx.xx.x.xx';
$cfgSources['localldap']['params']['root'] = 'dc=xxxx,dc=xxx';
$cfgSources['localldap']['params']['bind_dn'] = 'cn=Manager,dc=xxx';
$cfgSources['localldap']['params']['bind_password'] = 'xxxxxxxxxx';
$cfgSources['localldap']['params']['limit'] = 20;
$cfgSources['localldap']['params']['scope'] = 'sub';
$cfgSources['localldap']['map'] = array(
          '__key' => 'dn',
          '__uid' => 'mailacceptinggeneralid',
          'staffno' => 'staffnumber',
          'postalAddress' => 'postalAddress',
          'cn' => 'cn',
          'name' => array('fields' => array('cn', 'postalAddress'),
                          'format' => '%s %s',
                          'parse' => array(
                              array('fields' => array('cn'),
                                    'format' => '%s' ),
                              array('fields' => array('cn', 'postalAddress'),
                                    'format' => '%s', '%s' ))),
          'email' => 'mail',
          'freebusyUrl' => 'uid'
      );
$cfgSources['localldap']['search'] =  array('staffno','name','email');
$cfgSources['localldap']['export'] =  false;
$cfgSources['localldap']['browse'] =  false;

turba/prefs.local.php

<?php
$prefGroups['addressbooks']['suppress'] = true;
$prefGroups['sync']['suppress'] = true;
$prefGroups['columns']['suppress'] = true;
$_prefs['default_dir']['locked'] = true;
$_prefs['default_dir']['value'] = 'localsql';
$_prefs['columns']['locked'] = true;
$_prefs['columns']['value']=
"localsql\temail\nlocalldap\temail\tstaffno\nfavourites\temail";


With these settings, if I try to autocomplete on staff number, it does
not work.  While on name and email it works.





More information about the bugs mailing list