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.

Comments

hgoto’s picture

It's so late but this bug still exists and here is a patch for this.

hgoto’s picture

Status: Active » Needs review

Status: Needs review » Needs work

Status: Needs work » Needs review
hgoto’s picture

Version: 7.x-1.0-rc4 » 7.x-1.x-dev
ressa’s picture

Status: Needs review » Closed (outdated)

Thanks for working on this. In an attempt to help the maintainers, I am going through some of the Drupal 7 issues, and closing them, since Drupal 7 is EOL.

Maintainers should grant credit for the great work to the relevant users, even if the patch did not get committed: https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett....

Since Drupal 7 is EOL, we can probably close this issue, but feel free to re-open if this is still relevant, and we should consider adding this to the Drupal 11 version?

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.