Another possible workaround would be the following:
* add new field to the user class as you did already but don't modify
the user UI
* write a listener which will receive user document modification and
fill the standard adress field used the two custom fields when there
is a change (see
extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local)

On Tue, Oct 14, 2014 at 10:11 AM, Pascal BASTIEN
<[email protected]> wrote:
> Ok Thanks you.
>
> Then I searching and as soon it is surprising ... I managed another way :-)
>
> - I add a field in /edit/XWiki/XWikiUsers?editor=class, like town (string)
> by example,
> I disabled all ldapd field mapped to put them read only in 'edit mode'
>
> - I add it in /bin/view/XWiki/AdminUserProfileSheet page (section "contact")
>
> - and of course I modify in WEB-INF/xwiki.cfg
> xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,...,town=MyLDAPfiels
>
> Of course, to be perfet, I must disabled fields for ldapusers only.
>
> Pascal B
>
>
> ________________________________
> De : Thomas Mortagne <[email protected]>
> À : Pascal BASTIEN <[email protected]>; XWiki Users <[email protected]>
> Envoyé le : Lundi 13 octobre 2014 16h38
> Objet : Re: [xwiki-users] question about ldap authentication
>
> On Mon, Oct 13, 2014 at 4:17 PM, Pascal BASTIEN <[email protected]>
> wrote:
>> Hi,
>> On Xwiki 6.2.1, I use xwiki.authentication.ldap.fields_mapping parameter
>> in xwiki.cfg.
>>
>> Are there a way to concatenate two ldap fields?
>
> Unfortunately no. If you want to look at the code when this is done,
> see
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-ldap/xwiki-platform-ldap-authenticator/src/main/java/com/xpn/xwiki/plugin/ldap/XWikiLDAPUtils.java#L1042
> and
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-ldap/xwiki-platform-ldap-authenticator/src/main/java/com/xpn/xwiki/plugin/ldap/XWikiLDAPUtils.java#L1094.
>
>
>>
>> By example, I have two LDAP field for adress (street and town) and I want
>> concatenate them in the xwiki address field from XWiki User Class.
>>
>>  Thanks
>>
>> Pascal B
>
>> _______________________________________________
>> users mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/users
>
>
>
> --
> Thomas Mortagne
>
>
>



-- 
Thomas Mortagne
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to