On Tue, Jul 22, 2008 at 11:34 PM, Bruno Amaro Almeida
<[EMAIL PROTECTED]> wrote:
> But, can i get the value of username and password , so that way, decide
> where to redirect ?

I guess the easiest solution is to redirect to a page that will
perform another redirect, established according to the authenticated
user (however, this means double redirect, not very efficient).
So:
- in login.vm , the value of  xredirect should be set to
$xwiki.getURL('Main.GetUserRedirect') (for example)
- the Main.GetUserRedirect should contain something like this:
------------------------------------------------------------------
#set($redirect = 'Default.Page')
#if($context.user == 'XWiki.me')
#set($redirect='My.Page')
#elseif($context.user == 'XWiki.you')
#set($redirect='Your.Page')
#elseif(.....
...
#end
## or a more intelligent way to determine the target page
$response.sendRedirect($xwiki.getURL($redirect))
------------------------------------------------------------------

Another solution is to use a javascript listener to change the
xredirect field from the login form just before submit.
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to