Hello,

I added some others attributes (I don't know if you can do the same with file)
Add some attributes here: /bin/edit/XWiki/XWikiUsers?editor=class
e.g. myaddress
(disabled it to prevent your user modified it)

Add this field "myaddress" on the sheet:  /bin/view/XWiki/AdminUserProfileSheet
and finally add it in xwiki.cfg:
#-# retrieve the following fields from LDAP and store them in the XWiki user 
object (xwiki-attribute=ldap-attribute)
xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,email=xxxxx....cut....,myaddress=street
and choose a value for this setting:
#-# On every login update the mapped attributes from LDAP to XWiki otherwise 
this happens only once when the XWiki
#-# account is created.
#-# - 0: only when creating user
#-# - 1: at each authentication
#-# The default is 0
xwiki.authentication.ldap.update_user=1


(eventually add a XWiki.TranslationDocumentClass to translate myaddress 
attribute)


Pascal BASTIEN

--------------------------------------------
En date de : Ven 25.11.16, m...@ow2.org <m...@ow2.org> a écrit :

 Objet: [xwiki-users] API/Scripting : create user and attach some files to      
its profile
 À: "XWiki Users" <users@xwiki.org>
 Date: Vendredi 25 novembre 2016, 12h37
 
 Hi,
 
 I'm working on a registration system around xwiki.
 
 The basic workflow is the user is created in a LDAP
 directory at
 registration time. Then the user can login to xwiki.
 It's only upon the first successful login to xwiki that the
 user's xwiki
 profile is created in xwiki database.
 
 Now here is my point : how could I prepare the user profile
 *before* he
 gets connected ? For example I would be able to attach some
 files to
 XWiki.<username> and why not some others attributes.
 
 Is anyone already achieved this ?
 
 Cheers
 _______________________________________________
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to