Currently when I log out, I get redirected to the home page but with https. Is there a way I can logout but to http instead?

CommentFileSizeAuthor
#6 secureloginlogout.tar_.gz444 bytesWeb Assistant

Comments

Web Assistant’s picture

Issue summary: View changes

spelling mistake

mfb’s picture

Status: Active » Fixed

This would require you to create a small module, maybe called something like Insecure Logout :)

There's a number of different ways you could do this... you could implement implement hook_drupal_goto_alter() and set $options['https'] = FALSE when path == '' and user is anonymous, or implement hook_user_logout() and destroy the session and then redirect where ever you want, or implement hook_menu_alter() and override user_logout with your own custom page callback function for user/logout.

Web Assistant’s picture

Brilliant, thanks for the reply. I'll give them all a try, but using hook_user_logout() sounds good to me.

bancarddata’s picture

Web Assistant, if you don't mind posting what you come up with, I wouldn't mind hearing about it!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

starbucksguy’s picture

Status: Closed (fixed) » Active

I would like the same functionality, logging out to http. I don't know if I have the technical capabilities to write a module. Any further guidance on this issue would be great.

Web Assistant’s picture

StatusFileSize
new444 bytes

I completely forgot about this. I've just created a module with the advice from mfb and it seems to work just fine. Please find the module attached.

bancarddata’s picture

Thanks Web Assistant - that little solution works great.

Mreffie’s picture

Sorry if this is a silly question but i am not familiar with this extension of file - how will i go about installing this module
Thanks

bancarddata’s picture

gz is gzip compression and tar is an archiving program. The 2 combined is similar to a zip file (many files to one file, then compressed to smaller size). This is the standard for linux, but zip is typically used on the Windows side. Many zip file handlers for Windows will also support tar and gzip. 7-zip is a free one.

wxman’s picture

I just tried this and it worked perfectly. Thanks. I was trying to get the same results using rules.

mfb’s picture

Status: Active » Fixed

Marking this as fixed as there is a simple module attached which apparently works well. I personally think it's good to encourage ubiquitous use of HTTPS so don't see a strong need to add the functionality to Secure Login module :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

SilviuChingaru’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Category: support » feature
Priority: Minor » Normal
Status: Closed (fixed) » Active

The functionality of attached module should be implemented in core as option, maybe not enabled by default but should be there. There is no need for another module with 2 function to make this option available.
For example we want our users to be redirected back on insecure to get a cached version of the page trough our varnish server and not to stress apache or nginx.
As a note we have the following setup:
- Varnish that checks for SESS|AUTHSSL cookie and if found redirects to nginx on https. Nginx is configured to serve any static content like images, css and so on from drupal root and pass php request to apache. Also if an image is not found nginx passes the request for that file to apache. Nginx is also configured to redirect back to insecure if there is no session cookie found in request.

SilviuChingaru’s picture

Issue summary: View changes

grammer mistake this time

mfb’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

I'd like to keep this module as simple as possible, so I'd suggest putting this functionality in a module that you contribute.

Adon Irani’s picture

This is exactly what I wanted too -- logout to http for caching/load balancing
I quickly tried the contrib module Secure Login Logout, but it didn't actually work as planned (upon logout I was still https).

It's certainly not a major need, but it would be nice and clean to have.

Either way, THANK-YOU for this module. It's very helpful to me.