By v8powerage on
After logging out you're redirected to home page I don't like it, instead I wanna stay at the same page at which I pressed "log-out" button (I'm using 403 redirect to home so in case access denied error it will have no impact on user), how achieve this?
Comments
_
Try setting up a core trigger and action for it.
Add this inside a custom module
Thank You v. much ;-)
Thank You v. much ;-)
What about...
... if referer_uri() is not a page that an anomymous user is authorized to access?
_
then you'll get access denied.
Beautiful- Worked like a charm! 5 minute HOWTO
Here's the Cliff's Notes on how to make a module to make the user stay on the same page after logout. It takes 5 minutes, max.
Prerequisites: Drupal 6 and no other modules named 'stayafterlogout' in your sites/all/modules directory (99.998% of you will not).
Our module name will be 'stayafterlogout'. You can name your module anything, but make sure you change all the terms, functions, variables as appropriate to your own name in the directions below. In a hurry? Keep the same module name, 'stayafterlogout' and this is just a copy-paste endeavor.
sites/all/modules/stayafterlogoutsites/all/modules/stayafterlogout/stayafterlogout.moduleNOTE!: Do not include the final, closing '?>' tag. I placed it here on this page for text formatting purposes. See http://drupal.org/node/206754 for details.
sites/all/modules/stayafterlogout/stayafterlogout.infosites/all/modules/stayafterloginfolder you should now have your complete module, named appropriately, 'Stay After Logout', with two files:Thanks @WorldFallz for the info.
Joe Hyde
http://www.hydeinteractive.com/
Local News Platform Built on Drupal
http://sanangelolive.com/
Nice Howto Joe :-) You can
Nice Howto Joe :-)
You can remove the stayafterlogout_perm() function from the code as it's unused (and useless) here.
subscribing
subscribing
How to accomplish the opposite?
On my site, Drupal 6.20 is behaving differently. After logging out, the user stays on the page where he was before and gets an "Access denied" message. We would like to avoid this error message and redirect the user on logout to the frontpage. Sadly, Drupal core's actions/triggers do not allow this.
Any ideas?
You may point 403 / 404 pages
You may point 403 / 404 pages to "home" at /admin/settings/error-reporting
Thanks
Thanks you so much.. you save my time... its worked for me... :)