How to get 'returnto' to work after user logout?
Posted: Mon Apr 25, 2011 1:47 am
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>
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>