Roundcube Community Forum

 

LDAP autocompletion

Started by jc06, May 02, 2012, 11:39:21 AM

Previous topic - Next topic

jc06

    Hello,

First I want to thanks and congratulate: I'm à roundcube User for few years and I do really enjoy using it.

So the facts.

I upgraded yesterday my roundcube version to 0.7.2
I use LDAP server to store all my contacts informations.

When I'm writing a new mail the autocompletion recipient field works well but  the 'search_fields' parameter (in main.inc.php) seem not to be read correctly.
I would like the completion check 'sn' or 'l' LDAP records.
I read my ldap logs and obviously RoundCube check only 'mail' and 'cn' records

logs extract :
May  2 17:26:45 net1 slapd[30475]: conn=1067 op=1 SRCH base="ou=rect1,dc=domainxxx,dc=net" scope=2 deref=0 filter="(&(mail=*)(|(mail=*car*)(cn=*car*)))"


Do I detect a new bug or I miss something in the new config.

You can check my config (main.inc.php) here :
http://dl.dropbox.com/u/23298537/main.inc.php

Hope my post brings something really new.
Regards. JC

jc06

Juste for information.
If anyone want the autocompletion works fully with many ldap records

So, after my post to the forum and with no response after a week,
I decided eventually to posted to the bug tracking.
May be I discovered a bug ! ?

Quickly i recieved an answer :
« Search_fields are used only for searches where the fields aren't specified
(searching in all fields). So, not in autocompletion. »

All right it's not a bug.
Althought, I need this feature and in my mind it worked with an old release of my favourite Webmail RC (v 0.5 I think)

Don't care, I found the solution :
program/steps/mail/autocomplete.inc

67     //if ($result = $abook->search(array('email','name'), $search, $mode, true, true, 'email')) {
68     if ($result = $abook->search(array('email','name','locality','organization','surname'), $search, $mode, true, true, 'email')) {

Regards.