Back to last page after logout

Author Message

Jeroen Sangers

Friday 20 October 2006 8:24:25 am

Is there a way to redirect a user back to the last visited page after logout? I know how to redirect to a fixed page using the LogoutRedirect parameter, but I haven't found a way to go back to the last visited page, just as happens when logging in.

Ɓukasz Serwatka

Tuesday 24 October 2006 12:01:27 am

Hi,

This is not possible currently. Feel free to submit enhancement request.
You can write your own enhanced logout module based on current.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Renaud Patrick

Thursday 09 August 2007 5:02:32 am

Hello there, it has been only ten months since you asked. :)

If you *really* want to do this, you can by hacking /kernel/user/logout.php

When login out, you call /user/logout. Add a parameter representing the URL of your current page (that which you want to be redirected to).

Modify /kernel/user/logout.php so that it gets this parameter in $redirectURL (with some testing before, of course), and the last line of the code will do the trick

return $Module->redirectTo( $redirectURL );

Heath

Thursday 09 August 2007 6:52:52 pm

Hello,

I think this feature is useful and worth submitting an enhancement request to http://issues.ez.no

While you could hack/patch the kernel 'user' module's 'logout' view php code.

I think it would be cleaner to create an extension, which contained a simple module view based on the stock logout view's php code modified to provide your enhancement.

The end result is the same except you would be simpler to upgrade your eZ publish without conflicts.

You might even use mod_rewrite to maintain the same logout url name to hide the fact that this uses a separate module extension to perform the custom logout. Example: '/user/logout' to '/customuser/customlogout'.

This extension would be worth contributing as well on http://projects.ez.no

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Kristof Coomans

Friday 10 August 2007 12:30:25 am

There's an enhancement request for this: http://issues.ez.no/9275

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Paul Forsyth

Tuesday 30 October 2007 5:00:37 am

Simple patch for this added:

http://issues.ez.no/9275

Paul

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.