I use the secure site module to provide an authentication method for the recent changes RSS feed. So the secure site module is set to operate only on the "recent_changes/feed" and "recent_changes/feed/*" pages. For the rest of the website I use the normal login form. The problem is that when I log out on my website, the secure site login form is always shown. Users should of course only be bothered with the secure site login form when they try to access one of the listed pages ("recent_changes/feed" and "recent_changes/feed/*" ), and not when they log out. I identified the reason for this behavior in the function securesite_user, where it says:

    $securesite_enabled = variable_get('securesite_enabled', SECURESITE_DISABLED);
    if ($securesite_enabled == SECURESITE_AUTH || $securesite_enabled == SECURESITE_AUTH_ALT) {
      securesite_user_auth();
    }

I don't know why the login form (securesite_user_auth) should be shown on a logout. Maybe for clearing the cache? Buth that could also be done without showing the secure site login form. In my case, commenting the line securesite_user_auth(); after the if statement solves the problem. But this is probably not what the programmer meant. Any idea how this can be solved the right way, so that a user can log out without being presented a secure site login form?

CommentFileSizeAuthor
#2 securesite.patch7.07 KBleop
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

leop’s picture

Status: Active » Closed (duplicate)

Sorry guys, this is a duplicate of #103268: Log-in dialog is displayed on public page after log-out. But there is still no solution...

leop’s picture

Status: Closed (duplicate) » Needs review
FileSize
7.07 KB

Here is a patch for the problem described above for the 5.x branch. It is based on the patch for the 4.7 branch for the same problem.

It adds a function for showing an access denied page instead of the password reset form when the user cancels the login.

Also, the patch provides a cron hook which clears entries in the session table after a configurable amount of time, just as in 103268#11

Junyor’s picture

Status: Needs review » Closed (duplicate)

Please follow-up in issue #103268.