On version 6.x-1.4 I can use the Masquerade block to be anonymous and switch back when finished.

On version 6.x-1.5 if I masquerade as anonymous the Masquerade block disappears so I cannot switch back. I am effectively logged out.

CommentFileSizeAuthor
#1 masquerade.module.anonswitchback.patch726 byteslinksunten
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

linksunten’s picture

Hi there,

we noticed the same problem and investigated it. It seems that in hook_init the session variable gets initialised only when the user is logged in (which he/she is not, when masquerading as the anonymous user). We simply disabled the check (we commented out two lines in masquerade_init) and it works for us. Someone should investigate the side effects though.

IMC linksunten

Bobuido’s picture

Status: Active » Needs review

Subscribing - Same problem here

linksunten’s picture

Unfortunately, this does not work as expected. With this patch the module checks for every anonymous user if he or she is masqueraded by doing a SQL query. This effectively kills (at least varnish) caching.

deekayen’s picture

deekayen’s picture

Actually, #705858: Don't create session var when not masqerading is more related, but I'd rather make the pressflow crowd happy over the masquerade-as-anonymous crowd if I get to choose one. If you want this to work, you'll have to make a solution that works with Pressflow. If that means having compatability modes where the end user can choose supporting anonymous masquerade or pressflow support, that's probably ok.