Closed (outdated)
Project:
Masquerade
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Sep 2010 at 14:56 UTC
Updated:
14 Oct 2019 at 13:13 UTC
Jump to comment: Most recent
Comments
Comment #1
offback commentedAs I'm pretty new to drupal, I'm not sure if this is the right thing to do but I fixed this on my site by moving the code in the masquerade.module file the masquerade_user() function in the case update part of the code to the case submit part of the code. It seemed like there are times when masquerade_user() case update was called when the form data containing the users "masquerade as fields" has not been loaded in those cases the database field was cleared.
This may break other things but seems to be working for me.
case 'submit':
$old_session_id = session_id();
/* code move from case update to case submit */
if ($category == 'account') {
$users = drupal_explode_tags($edit['masquerade_users']);
db_query("DELETE FROM {masquerade_users} WHERE uid_from = %d", $edit_user->uid);
foreach ($users as $user) {
$u = user_load(array('name' => $user));
db_query("INSERT INTO {masquerade_users} VALUES (%d, %d)", $edit_user->uid, $u->uid);
}
$edit['masquerade_users'] = NULL;
}
/* end code moved */
break;
case 'update':
break;
Comment #2
boftx commentedI tried this, and it does keep existing assignments in place.
Howerver ...
It prevents new ones from being assigned.
Comment #3
avpadernoI am closing this bug report, as Drupal 6 is no longer supported. Please re-open it if the issue is still relevant for the Drupal 7 or 8 version of the module.