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.
The code in masquerade_user_logout($account) contains
if (!empty($account->masquerading))
The users could not logout back to their original user. I changed the code to the following and users could logout without problems using the standard Drupal logout menu entry.
if (!empty($_SESSION['masquerading']))
An alternative might be to load $account->masquerading in hook_user_load.
Comment | File | Size | Author |
---|---|---|---|
#1 | masquerade-fix_masquerade_user_logout_status_check_value-1425380-1.patch | 741 bytes | hgoto |
Comments
Comment #1
hgoto CreditAttribution: hgoto as a volunteer and at Studio Umi commentedIt's so late but this bug still exists and here is a patch for this.
Comment #2
hgoto CreditAttribution: hgoto as a volunteer and at Studio Umi commentedComment #5
hgoto CreditAttribution: hgoto as a volunteer and at Studio Umi commented