Hi!
Bauyrzhan Matyganov wrote:
Hello dear friends and community
I need your help with registering users.
The question is:
I have a database table wich contains a list of registered users to my
website.
Now, I want to import this list of users to my XWIKI application.
But i dont know how to import it.
I can select all user name and put them in an xwiki array or set.
and then, i can write a script that will use a for loop to create users
taking username from the array and putting a defualt pathword which users
can change later.
#set($userNames=
{"A","B","C",...................................................})
#set($fields = [])
##
#foreach($userName in $userNames)
## The first name field, no checking.
#set($field = $userNames)
#set($discard = $fields.add($field))
etc....
#createUser($fields, $request, $response, $doAfterRegistration)
#end
will it work?
I am not proficient in XWiki and velocity programming, and I ask for your
help.
Any help will be appriciated.
Have you checked this snippet?
http://code.xwiki.org/xwiki/bin/view/Snippets/Create200DummyUsersSnippet
You "only" needs to create somehow that users list from your current
database (dynamically or statically depends on your requirements!)
HTH,
Ricardo
--
Ricardo RodrÃguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems