[turba] Re: how to combine givenname and sn to cn ?

andreas oster aoster at novanetwork.de
Tue Apr 13 03:17:02 PDT 2004


andreas oster wrote:
> Jan Schneider wrote:
> 
>> Zitat von andreas oster <aoster at novanetwork.de>:
>>
>>> Hi List,
>>>
>>> for the creation of new LDAP enries I have added two
>>> new attributes for givenname and surname. This works
>>> well, but when adding a new contact I have to enter
>>> the name twice, one time for cn and second for sn
>>> and givenname. Is it possible to combine sn and givenname
>>> to generate the cn ? How and where in the code can this
>>> be done ?
>>
>>
>>
>> Turba 2.0 supports this via composite fields.
>>
>> Jan.
>>
>> -- 
>> http://www.horde.org - The Horde Project
>> http://www.ammma.de - Neue Wege des Lernens
>> http://www.tip4all.de - Deine private Tippgemeinschaft
> 
> Hello Jan,
> 
> I have one more question. After inserting the following
> line into my sources.php the name field is propperly
> combined from  firstname and lastname field.
> 
> 'name' => array('fields' => array('firstname', 'lastname'),
> 
> Now I have run into another problem. Before, i had an entry
> 'name' => 'cn',
> and the ldap entry was created with a cn (the name field
> content). Now this doesn't work anymore, obviously because the
> name > cn mapping was removed. How can I assign the content
> of the composite field to the cn for the new ldap entry ?
> 
> 
> thank you again for your kind help
> 
> best regards
> 
> Andreas
> 
> 
>              'format' => '%s %s')
> 
Hi List,

sadly, nobody answered my last plea for help :( So this is another
attempt. I am still stuck with the problem I described in my last
posting. I accomplished, with the kind help from Jan, to combine
the two fields 'firstname' and 'lastname' into the 'name' field. But
I want to use this combined name field as the cn in my ldap entry,
which isn't working. I do not know how to assign the 'name' field
to 'cn'. With the 'name' => 'cn' in sources.php this worked just fine,
but how can something similar be acomplished with a composite filed ?

Thanks for your help

best regards

Andreas



More information about the turba mailing list