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.
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 CreditAttribution: 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.