Forums / Setup & design / Back to last page after logout

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

eZ debug

Timing: Jan 29 2025 13:30:01
Script start
Timing: Jan 29 2025 13:30:01
Module start 'content'
Timing: Jan 29 2025 13:30:01
Module end 'content'
Timing: Jan 29 2025 13:30:01
Script end

Main resources:

Total runtime0.2036 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 587.9453180.8359
Module start 'content' 0.00810.0080 768.781397.9922
Module end 'content' 0.01610.1874 866.7734525.9297
Script end 0.2035  1,392.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00381.8631200.0002
Check MTime0.00160.7896200.0001
Mysql Total
Database connection0.00130.617310.0013
Mysqli_queries0.142870.12991410.0010
Looping result0.00170.85651390.0000
Template Total0.186991.810.1869
Template load0.00100.504010.0010
Template processing0.185891.271510.1858
Override
Cache load0.00070.348710.0007
Sytem overhead
Fetch class attribute can translate value0.00070.348210.0007
XML
Image XML parsing0.00020.100710.0002
General
dbfile0.01195.8554200.0006
String conversion0.00000.003930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs