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
)
On Tue, Oct 14, 2014 at 10:11 AM, Pascal BASTIEN
<pbasnews-xwiki(a)yahoo.fr> 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 <thomas.mortagne(a)xwiki.com>
À : Pascal BASTIEN <pbasnews-xwiki(a)yahoo.fr>fr>; XWiki Users <users(a)xwiki.org>
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 <pbasnews-xwiki(a)yahoo.fr>
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/xwi…
and
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi….
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
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne