[xwiki-users] Loginsubmit
Hello, I am trying to change the registration page, so that it redirects to the pevious page after you have registered (like after you have logged in) I know, that login.vm and registerinline.vm are called in global.vm. My first try was to add xredirect=$xwiki.getURLEncoded($logredir) to the $regurl, but it did work. I now asume that sending the parameters (like current page/requested page) is somehow handled when I call $doc.getURL("loginsubmit") like in login.vm. Where can I find the template/page behind this url? Or the other way round. What is responsible to call the xwiki/bin/login/XWiki/XWikiLogin page everytime I click on "edit" a page? I hope you can give me an answer. Thanks! Spinring -- View this message in context: http://n2.nabble.com/Loginsubmit-tp1115532p1115532.html Sent from the XWiki- Users mailing list archive at Nabble.com.
On Wed, Sep 24, 2008 at 4:44 PM, Spinring <[email protected]> wrote:
Hello,
I am trying to change the registration page, so that it redirects to the pevious page after you have registered (like after you have logged in)
I know, that login.vm and registerinline.vm are called in global.vm. My first try was to add xredirect=$xwiki.getURLEncoded($logredir) to the $regurl, but it did work.
The register action takes into account the xredirect and do it immediatly. [1] Anyway you could add redirect=$xwiki.getURLEncoded($logredir) to the $regurl (global.vm) And apply this to registerinline.vm #elseif($reg) + #if($request.redirect) + $response.sendRedirect($request.redirect) + #end #set($xwname = "XWiki.${request.xwikiname}") #info("$msg.get('core.register.successful', [$xwiki.getUserName($xwname), $request.xwikiname])") #end Anyway I'm not sure that you'll get the expected behavior since the user will be correctly redirected .. without being logged in. To log the user automatically after sign up (+ redirection) you can apply the following patch to registerinline.vm (replace the one above) : #elseif($reg) + #if($request.redirect) + #set ($xredirect = $xwiki.getURL("XWiki.XWikiLogin", "loginsubmit", "j_username=$!request.xwikiname&j_password=$!request.register_password&xredirect=$!request.redirect")) + $response.sendRedirect($xredirect) + #end #set($xwname = "XWiki.${request.xwikiname}") #info("$msg.get('core.register.successful', [$xwiki.getUserName($xwname), $request.xwikiname])") #end 1) While we are at it, WWYT about adding this in XE 1.7, xwiki devs ? Is it bad to have the password sent over the network once again ? 2) In this case is there a reason to keep the sendRedirect call in RegisterAction (see [1]) ? Thanks, JV.
participants (2)
-
Jean-Vincent Drean -
Spinring