And by that of course I mean: #set($loginurl = $xwiki.getURL("XWiki.XWikiLogin","login", "xredirect=$xwiki.getURL('XWiki.RedirectUser')"))
Sergiu Dumitriu wrote: > #set($logouturl = $xwiki.getURL("XWiki.XWikiLogout","logout", > "xredirect=$xwiki.getURL('XWiki.RedirectUser')")) > > And then edit the document XWiki.RedirectUser and put in there: > > $response.sendRedirect($xwiki.getURL($context.user)) > > Dan wrote: >> Thanks a lot. But maybe I made it confused, English is not my mother >> language. >> In fact what I need is that after the user entering username/password >> and click the log-in button, the next page should be the user's >> profile page. For example, after entering username/password the user >> Admin click log-in, then the coming page should be >> http://localhost:8080/xwiki/bin/view/XWiki/Admin >> The problem is that before log-in, we can't get the username and user >> profile page URL in global.vm because we don't know which user will >> exactly log-in. >> >> -------------------------------------------------- >>> ------------------------------ >>> >>> Message: 3 >>> Date: Thu, 6 Mar 2008 12:38:01 +0100 >>> From: "Dan" <[EMAIL PROTECTED]> >>> Subject: [xwiki-users] Automatic forward to user page after login? >>> To: <users@xwiki.org> >>> Message-ID: <[EMAIL PROTECTED]> >>> Content-Type: text/plain; charset="gb2312" >>> >>> Hello, all >>> Currently after login, the user will be forwarded to the former page. >>> Is it possible to automatically forward the user to his own page? >>> Shall I modify some .vm templates or I have to do java coding? >>> Please kindly give some instructions. >>> Thanks a lot. >>> -------------- next part -------------- >>> An HTML attachment was scrubbed... >>> URL: >>> http://lists.xwiki.org/pipermail/users/attachments/20080306/fe132e61/attachment-0001.htm >>> >>> >>> >>> ------------------------------ >>> >>> Message: 4 >>> Date: Thu, 6 Mar 2008 03:58:18 -0800 (PST) >>> From: "[Ricardo Rodriguez]" <[EMAIL PROTECTED]> >>> Subject: Re: [xwiki-users] Automatic forward to user page after login? >>> To: users@xwiki.org >>> Message-ID: <[EMAIL PROTECTED]> >>> Content-Type: text/plain; charset=us-ascii >>> >>> >>> Hi Dan, >>> >>> >>> Dan-241 wrote: >>>> Hello, all >>>> Currently after login, the user will be forwarded to the former >>>> page. Is >>>> it possible to automatically forward the user to his own page? >>>> Shall I modify some .vm templates or I have to do java coding? >>>> Please kindly give some instructions. >>>> Thanks a lot. >>>> >>> The implied template is global.vm >>> >>> Look for $logouturl. See this... >>> >>> #set($logouturl = $xwiki.getURL("XWiki.XWikiLogout","logout", >>> "xredirect=anywhere")) >>> $!logouturl $!msg.get("logout") #sep() >>> >>> Where anywhere is the page you will reach at logout time. >>> >>> HTH, >>> >>> Ricardo >>> >>> >>> >>> -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users