[turba] Re: Turba changing contact name

John Dalbec jpdalbec at ysu.edu
Tue Apr 8 18:22:07 PDT 2003


Chuck Hagenbuch wrote:
> Quoting chris at wilber.me.uk:
> 
> 
>>OK I have not done any php, but have been itching to try.
>>To be clear, this is what happens at the moment. After editing name,end
>>up with:
>>dn: cn=John
>>Smith,ou=personal_addressbook,uid=chris,ou=Users,o=Schoolhouse
>>objectClass: top
>>objectClass: person
>>objectClass: organizationalPerson
>>objectClass: inetOrgPerson
>>cn: John R Smith
>>mail: john.smith at company.com
>>
>>In other words mismatch in cn and so now if I try an add another John
>>Smith I can't.
> 
> 
> Right... what I am unclear on is how exactly we fix this.

Is this what you're looking for?

http://www.php.net/manual/en/function.ldap-rename.php

ldap_rename ($ldap, "cn=John Smith,...", "cn=John R Smith", 
"ou=personal_addressbook,...", TRUE);

Or are you concerned about how to identify the naming attribute to 
handle this special case correctly?

HTH,
John

> 
> 
>>>The 'dn' array in the LDAP params should take care of this, yes?
>>
>>I have experimented and I am not really sure what tbis does ;-). Does it
>>just identify how the dn is made up? So in my case from above it should
>>be: 'dn' => array('cn','ou','uid','ou','o') ?
>>It doesn't seem to matter what I put in here. What is it used for?
> 
> 
> It's used for generating the dn of new entries.
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck at horde.org>
> "... It is not more light we need, but more warmth! We die of cold, not of
> darkness. It is not the night that kills, but the frost." - Miguel de
> Unamuno
> 





More information about the turba mailing list