We're using the masquerade-module in an environment with SSO/Shibboleth. Those modules (and other SSO-implementations I guess) are using hook_user_logout to redirect the user to a certain logout-page to disable the SSO-session.

In this setup you have to re-login every time you try to switch the user, which is... annoying.

To solve this I've added a configuration option to disable the call of hook_user_logout.

Comments

phreaknerd created an issue. See original summary.

phreaknerd’s picture

The patch.

phreaknerd’s picture

Category: Feature request » Bug report
Status: Active » Needs review
andypost’s picture

The primary idea of the module that we do full logout/login to masquerade
if you skip any of hooks - it's not a logout anymore

+1 to wont fix

+++ b/masquerade.module
@@ -844,7 +851,7 @@ function masquerade_switch_user($uid) {
-  module_invoke_all('user_logout', $user);
+  if(!variable_get('masquerade_disable_logout_hooks', 0)) module_invoke_all('user_logout', $user);

this will not work

kala4ek’s picture

This variable may be disabled by default...

hgoto’s picture

I agree with andypost. If the logout hooks are skipped, unexpected behaviors can easily happen, I think...

solideogloria’s picture

Status: Needs review » Closed (won't fix)