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;


andypost’s picture

Priority:Normal» Major

Suppose you right, should be included in release

fprevos2’s picture

I 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.