By fgasking on
At present, if you logout from Drupal, you are redirected to the Home page, but with no notification or message to say that you have logged out.
Is it possible to override the logout functionality so that it redirects you back to the user/login form, and additionally see that the user has logged out and add some text above the standard login form such as:
"You have signed out successfully"
I've had a good look around, and Automatic Logout seems to have a popup when a user is logged out, but then I don't want the automatic logout functionality :-)
Any help is really appreciated, thanks!
Comments
I'm doing something a little
I'm doing something a little different on logout, namely redirecting the user to the page they were on when they logged out, like so
Changing the drupal_get_destination() call to the page you want to redirect to should do it.
I don't know how to tell if someone's just logged out. I'm using a customized login block per http://drupal.org/node/19855, with a backup logged-in block that displays when a user is logged in. When they log out, the logged-in block goes away and is replaced by the login form, and that's the indicator.
HTH,
Bill
Works great for me
Works great for me. Also I add rel=nofollow by using the following code inside the block:
Or you can use the following
Or you can use the following tip: http://drupal.org/node/363481#comment-2847976
You could also do this with
You could also do this with an action and trigger. You create a 'redirect url' action and assign it to the trigger 'user logs out'. I believe you can also set a message.
No 'user logs out'
@davidhernandez: I don't have a 'user logs out' trigger at
./admin/build/trigger/user. There is only 'Trigger: After a user has logged out', and this trigger doesn't allow to select a 'Redirect to URL' action (Drupal 6.20).You are correct. Redirect to
You are correct. Redirect to Url is not available for user has logged out. I don't know why. You could try the Rules module.
parallel thread
There is a parallel thread about this right now:
http://drupal.org/node/768768
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com