Hi Pascal,
Thanks for the tip :)

It answers to the "how to add a field" part of my question. But it
doesn't answer about attaching file to the profile. The main issue I see
here is the account is created on login. Or maybe there might be a hook
system so we can trigger something when the account is created( ie, to
attach files to the profile) ?

Cheers,

Le 28/11/2016 à 08:46, Pascal BASTIEN a écrit :
> 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, [email protected] <[email protected]> a écrit :
> 
>  Objet: [xwiki-users] API/Scripting : create user and attach some files to    
> its profile
>  À: "XWiki Users" <[email protected]>
>  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
>  [email protected]
>  http://lists.xwiki.org/mailman/listinfo/users
>  
> 

Reply via email to