6.0.0-git
2018-12-16

[#8986] Creation of contact list from LDAP search output
Summary Creation of contact list from LDAP search output
Queue Turba
Queue Version 2.3.5
Type Bug
State Assigned
Priority 1. Low
Owners
Requester athavale.anant (at) gmail (dot) com
Created 2010-04-25 (3157 days ago)
Due
Updated 2011-07-01 (2725 days ago)
Assigned 2011-02-20 (2856 days ago)
Resolved
Milestone
Patch No

History
2011-07-01 20:48:19 Jan Schneider Version ⇒ 2.3.5
Queue ⇒ Turba
 
2011-02-20 01:52:22 Chuck Hagenbuch State ⇒ Assigned
 
2010-04-29 05:23:29 asa (at) isac (dot) gov (dot) in Comment #3 Reply to this comment
Please put the following line at the start of the method addMember() 
in turba/lib/Object/Group.php and post the output:
var_dump($contactId, $sourceId);
Then put the following line at the end of the method above the 
"return true" line:
var_dump($this->attributes);
Output of var_dumps when __key=mailacceptinggeneralid and search is 
for names having 'rajiv'.

string(6) "brajiv" string(9) "localldap" string(5) "rajiv" string(9) 
"localldap" string(6) "rajivk" string(9) "localldap"

and output of var_dumps when __key = 'dn' (default)

string(141) "cn=RAJIV BHATIA,ou=CONTROL SYSTEMS GROUP,ou=CONTROL 
SYSTEMS GROUP,ou=CONTROL SYSTEMS GROUP,ou=CONTROL AND MISSION 
AREA,ou=isac,dc=isro,dc=dos" string(9) "localldap" array(40) { 
["__key"]=> string(32) "a0f948d65e13bf236e4adf8f466d4355" 
["__owner"]=> string(17) "anant@isac.gov.in" ["__type"]=> string(5) 
"Group" ["__members"]=> string(170) 
"a:1:{i:0;s:151:"localldap:cn=RAJIV BHATIA,ou=CONTROL SYSTEMS 
GROUP,ou=CONTROL SYSTEMS GROUP,ou=CONTROL SYSTEMS GROUP,ou=CONTROL AND 
MISSION AREA,ou=isac,dc=isro,dc=dos";}" ["__uid"]=> string(52) 
"20100429105246.102150uymj473v6u@ldap.isac.dos.gov.in" ["firstname"]=> 
NULL ["lastname"]=> string(6) "RAJIVS" ["middlenames"]=> NULL 
["namePrefix"]=> NULL ["nameSuffix"]=> NULL ["alias"]=> NULL 
["birthday"]=> NULL ["homeStreet"]=> NULL ["homePOBox"]=> NULL 
["homeCity"]=> NULL ["homeProvince"]=> NULL ["homePostalCode"]=> NULL 
["homeCountry"]=> NULL ["workStreet"]=> NULL ["workPOBox"]=> NULL 
["workCity"]=> NULL ["workProvince"]=> NULL ["workPostalCode"]=> NULL 
["workCountry"]=> NULL ["timezone"]=> NULL ["email"]=> NULL 
["homePhone"]=> NULL ["workPhone"]=> NULL ["cellPhone"]=> NULL 
["fax"]=> NULL ["pager"]=> NULL ["title"]=> NULL ["role"]=> NULL 
["company"]=> NULL ["category"]=> NULL ["notes"]=> NULL ["website"]=> 
NULL ["freebusyUrl"]=> NULL ["pgpPublicKey"]=> NULL 
["smimePublicKey"]=> NULL } string(190) "cn=RAJIV RATAN 
CHETWANI,ou=sheads,ou=Central Computer Systems Division,ou=Central 
Computer Systems Division,ou=COMPUTERS AND INFORMATION 
GROUP,ou=DIRECTORS OFFICE AREA,ou=isac,dc=isro,dc=dos" string(9) 
"localldap" array(40) { ["__key"]=> string(32) 
"a0f948d65e13bf236e4adf8f466d4355" ["__owner"]=> string(17) 
"anant@isac.gov.in" ["__type"]=> string(5) "Group" ["__members"]=> 
string(383) "a:2:{i:0;s:151:"localldap:cn=RAJIV BHATIA,ou=CONTROL 
SYSTEMS GROUP,ou=CONTROL SYSTEMS GROUP,ou=CONTROL SYSTEMS 
GROUP,ou=CONTROL AND MISSION 
AREA,ou=isac,dc=isro,dc=dos";i:1;s:200:"localldap:cn=RAJIV RATAN 
CHETWANI,ou=sheads,ou=Central Computer Systems Division,ou=Central 
Computer Systems Division,ou=COMPUTERS AND INFORMATION 
GROUP,ou=DIRECTORS OFFICE AREA,ou=isac,dc=isro,dc=dos";}" ["__uid"]=> 
string(52) "20100429105246.102150uymj473v6u@ldap.isac.dos.gov.in" 
["firstname"]=> NULL ["lastname"]=> string(6) "RAJIVS" 
["middlenames"]=> NULL ["namePrefix"]=> NULL ["nameSuffix"]=> NULL 
["alias"]=> NULL ["birthday"]=> NULL ["homeStreet"]=> NULL 
["homePOBox"]=> NULL ["homeCity"]=> NULL ["homeProvince"]=> NULL 
["homePostalCode"]=> NULL ["homeCountry"]=> NULL ["workStreet"]=> NULL 
["workPOBox"]=> NULL ["workCity"]=> NULL ["workProvince"]=> NULL 
["workPostalCode"]=> NULL ["workCountry"]=> NULL ["timezone"]=> NULL 
["email"]=> NULL ["homePhone"]=> NULL ["workPhone"]=> NULL 
["cellPhone"]=> NULL ["fax"]=> NULL ["pager"]=> NULL ["title"]=> NULL 
["role"]=> NULL ["company"]=> NULL ["category"]=> NULL ["notes"]=> 
NULL ["website"]=> NULL ["freebusyUrl"]=> NULL ["pgpPublicKey"]=> NULL 
["smimePublicKey"]=> NULL } string(157) "cn=RAJIV KUMAR,ou=Structural 
Design Section,ou=Structural Design & Fabrication 
Division,ou=STRUCTURES GROUP,ou=MECHANICAL SYSTEMS 
AREA,ou=isac,dc=isro,dc=dos" string(9) "localldap" array(40) { 
["__key"]=> string(32) "a0f948d65e13bf236e4adf8f466d4355" 
["__owner"]=> string(17) "anant@isac.gov.in" ["__type"]=> string(5) 
"Group" ["__members"]=> string(563) 
"a:3:{i:0;s:151:"localldap:cn=RAJIV BHATIA,ou=CONTROL SYSTEMS 
GROUP,ou=CONTROL SYSTEMS GROUP,ou=CONTROL SYSTEMS GROUP,ou=CONTROL AND 
MISSION AREA,ou=isac,dc=isro,dc=dos";i:1;s:200:"localldap:cn=RAJIV 
RATAN CHETWANI,ou=sheads,ou=Central Computer Systems 
Division,ou=Central Computer Systems Division,ou=COMPUTERS AND 
INFORMATION GROUP,ou=DIRECTORS OFFICE 
AREA,ou=isac,dc=isro,dc=dos";i:2;s:167:"localldap:cn=RAJIV 
KUMAR,ou=Structural Design Section,ou=Structural Design & Fabrication 
Division,ou=STRUCTURES GROUP,ou=MECHANICAL SYSTEMS 
AREA,ou=isac,dc=isro,dc=dos";}" ["__uid"]=> string(52) 
"20100429105246.102150uymj473v6u@ldap.isac.dos.gov.in" ["firstname"]=> 
NULL ["lastname"]=> string(6) "RAJIVS" ["middlenames"]=> NULL 
["namePrefix"]=> NULL ["nameSuffix"]=> NULL ["alias"]=> NULL 
["birthday"]=> NULL ["homeStreet"]=> NULL ["homePOBox"]=> NULL 
["homeCity"]=> NULL ["homeProvince"]=> NULL ["homePostalCode"]=> NULL 
["homeCountry"]=> NULL ["workStreet"]=> NULL ["workPOBox"]=> NULL 
["workCity"]=> NULL ["workProvince"]=> NULL ["workPostalCode"]=> NULL 
["workCountry"]=> NULL ["timezone"]=> NULL ["email"]=> NULL 
["homePhone"]=> NULL ["workPhone"]=> NULL ["cellPhone"]=> NULL 
["fax"]=> NULL ["pager"]=> NULL ["title"]=> NULL ["role"]=> NULL 
["company"]=> NULL ["category"]=> NULL ["notes"]=> NULL ["website"]=> 
NULL ["freebusyUrl"]=> NULL ["pgpPublicKey"]=> NULL 
["smimePublicKey"]=> NULL }

I think, attribute name is not getting added when __key is set to 
anything other than dn.

2010-04-28 12:48:55 Jan Schneider Comment #2
State ⇒ Feedback
Priority ⇒ 1. Low
Reply to this comment
Please put the following line at the start of the method addMember() 
in turba/lib/Object/Group.php and post the output:
var_dump($contactId, $sourceId);
Then put the following line at the end of the method above the "return 
true" line:
var_dump($this->attributes);
2010-04-25 10:07:10 athavale (dot) anant (at) gmail (dot) com Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 3. High
Summary ⇒ Creation of contact list from LDAP search output
Queue ⇒ Horde Groupware Webmail Edition
Milestone ⇒
Patch ⇒ No
Reply to this comment
Unable to save contacts in contact list when __key attribute is set to 
anything other than 'dn' in turba/sources.php for LDAP source.

I search for some entries from LDAP source and add to my address book 
contact list.  It says added, but does not list.  object_members has 
NULL value for the contact list created.

Saved Queries