In the function function masquerade_switch_user($uid), the assignment for $user->masquerading is not working.
The following code at line 805:
$user->masquerading = $new_user->uid;
$user = $new_user;should be changed to:
$new_user->masquerading = $user->uid;
$user = $new_user;
Comments
Comment #1
andypostSuppose you right, should be included in release
Comment #2
fprevos2 commentedI did a search on a new checkout of the code and the only time the property masquerading is set in on the initial user switch. But on the next page it never reload.Either you replace all call to "$user->masquerading" with a check on $_SESSION['masquerading'] or you actual set masquerading field on hook_init.My mistake, it not loaded on all page but it is only used for switching users.
Comment #3
ressaThanks 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.