Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | masquerade.module.anonswitchback.patch | 726 bytes | linksunten |
Comments
Comment #1
linksunten CreditAttribution: linksunten commentedHi 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
Comment #2
Bobuido CreditAttribution: Bobuido commentedSubscribing - Same problem here
Comment #3
linksunten CreditAttribution: linksunten commentedUnfortunately, 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.
Comment #4
deekayen CreditAttribution: deekayen commented#695952: Unable to "switch back" to Admin having masqueraded as another user
Comment #5
deekayen CreditAttribution: deekayen commentedActually, #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.