Tharindu Madushanka wrote:
> Hi,
> I am interested in solving this Jira issue and I have been working on it.
> Its about displaying a warning to user when creating a user with a user name
> that already exists. Issue occurs when adding users from admin account.
> Below are the given steps to generate it
> 
> Administration -> 'Users' -> Add New User -> Try creating user with same
> user name -> Nothing happens (or warning)
> 
> Adding a user from register button displays warning and uses warnings
> defined in registerinline.vm called from register.vm template.
> I have started looking at the xwiki-core code, specifically
> com.xpn.xwiki.web.
> What I found is as follows when adding a user with same user name,
> when creating a new user from RegisterAction class ->
> xwiki.createUser(true,"edit",context) returns -3 indicating user already
> exists. And when adding from Administration panel I found it calls a
> template 'registeruser?ajax=1.vm' that is not in /templates folder. There
> fore, can you suggest me some steps to display a warning to user, when
> adding users from Administration panel. It uses Ajax to display 'add new
> user' UI. Here I am not clear on what template is being called and what to
> look for the next step. I have just stuck with this. I thought of sending a
> mail, I would get some points to continue with.

Of course there is a registeruser template in the /templates folder. 
It's called registeruser.vm.

When a URL contains xpage=xyz, then the xyz.vm template is the one 
producing the output.

A good tool you can use is the Firebug Firefox plugin, which allows to 
monitor ajax requests.
-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to