I can't get 'returnto' to work after user logs out. With the setup detailed below, clicking the logout button on the logout page clears the content of that page, and displays the login link in the header, but does not change page.
What can I do to fix this?
I've tested with omitted parameter(s) (combinations of form, returnto) without success (actually, in one case after logout it showed the login page immediately).
On the login page, a 'returnto' option in the module tag works as expected.
I'm using 1.9.4.1
In the page template (for display in each page's header):
{ if $ccuser->loggedin() }
{cms_selflink page="logout" text="Logout"} {$ccuser->username()}
{else}
{cms_selflink page="login" text="Login"}
{/if}
In the logout page content block:
{cms_module module='FrontEndUsers' form='logout' returnto='home'}
In the logout template:
<p>So, {$username}, you want to <a href="{$url_logout}" title="{$mod->Lang('info_logout')}">{$mod->Lang('logout')|lower}</a> ...</p>
How to get 'returnto' to work after user logout?
-
- Forum Members
- Posts: 15
- Joined: Mon Apr 11, 2011 7:33 am
-
- Forum Members
- Posts: 15
- Joined: Mon Apr 11, 2011 7:33 am
Re: How to get 'returnto' to work after user logout? SOLVED
Plowing through the code of the FrontEndUsers module, I found that it effectively ignores the 'returnto' parameter during any logout.
I've fixed mine, and would be happy to post the changes.
However I also needed, and implemented, some hooks for returning to anywhere after logout, not just to a specified page ('returnto'=....) or to the page where the logout form is ('returnlast'=1).
So a little bit of work is needed to distinguish the fixes from the additions, in a global diff.
Anyhow, it's available for the asking.
I've fixed mine, and would be happy to post the changes.
However I also needed, and implemented, some hooks for returning to anywhere after logout, not just to a specified page ('returnto'=....) or to the page where the logout form is ('returnlast'=1).
So a little bit of work is needed to distinguish the fixes from the additions, in a global diff.
Anyhow, it's available for the asking.
Re: How to get 'returnto' to work after user logout? SOLVED
tomphantoo wrote: Anyhow, it's available for the asking.
Hello tomphantoo, was also strugling with this returnto in the logoput form for FEU. I'd like to know the solution if you don't mind.
thanks.
Re: How to get 'returnto' to work after user logout?
did you guys check out the settings of FEU? there you can set the page_id of the page you want to open after logging out. or am i missing something?
Re: How to get 'returnto' to work after user logout?
nicmare wrote:did you guys check out the settings of FEU? there you can set the page_id of the page you want to open after logging out. or am i missing something?
Yes checked out the settings of FEU... this is my code for logout and to return to a paga of my choice
Code: Select all
{cms_module module=FrontEndUsers form='logout' returnto='63'}
Logout won't go the the reurnto page