Hi,
On Tue, Jan 26, 2010 at 4:09 PM, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
On 01/26/2010 02:30 PM, Guillaume Lerouge wrote:
Hi Valdis,
On Tue, Jan 26, 2010 at 12:52 PM, Valdis Vītoliņš<valdis.vitolins(a)odo.lv
wrote:
For custom application I need to add more
properties
for ../xwiki/bin/edit/XWiki/XWikiUsers?editor=class
Is it acceptable/recommended way or other (more complicated?) approach
would be better?
Do you have any experience?
It would work. However I'd recommend an alternative approach:
- Create a XWiki.ExtendUserClass holding your properties
- Add an object from this class to your user profiles
- Use it to store information
I also recommend this, but there's a problem: creating a new user only
adds the XWikiUsers object, since it doesn't create documents based on a
template. This means that somewhere you'll have to add this object.
A solution is to put a check in the user sheet, similar to what is done
for WebPreferences and a missing XWikiPreferences object.
#if(!$doc.getObject('XWiki.ExtendUserClass'))
$response.sendRedirect($doc.getURL('objectadd',
'classname=XWiki.ExtendUserClass'))
#end
By the way, this reminds me that right now the WebPreferences page is
created in syntax 2.0 while its content is XWiki 1.0 syntax that doesn't get
displayed correctly.
Guillaule
This way you
can upgrade the XWikiUsers class when needed.
Guillaume
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Guillaume Lerouge
Product Manager - XWiki SAS
Skype: wikibc
Twitter: glerouge