Closed (fixed)
Project:
Masquerade
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2008 at 11:02 UTC
Updated:
14 Sep 2009 at 17:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
deviantintegral commentedI've started to implement this feature as I need it for a client. I'm currently implementing it so it doesn't use any other modules, but I'm going to write the functionality so it could easily be extended to support other sources of user lists.
Right now, it's just going to have an auto-complete text field in the user edit page to allow specifying the users a user is able to switch to. I plan on posting a starting patch in the next day or so.
Comment #2
deviantintegral commentedHere is a patch. It doesn't completely work at the moment due to the issue over at #521444: Store user ID's instead of user names for quick switch links.
It works by adding an autocomplete field to each user's edit page, where administrators can enter user names able to be switched to. The users are then automatically added to the "quick switch" list.
I have a patch against 6.x-1.1 if anyone is interested, though it will break updates a bit down the line due to install hooks being added in the -dev release.
Comment #3
deviantintegral commentedAbout integration for other modules; I think the best solution is to add a hook which other modules can implement. How about a hook like the following?
hook_masquerade_user_switch($account = NULL);Modules would be expected to return an array of user_from => user_to pairs. If $account is NULL, return pairs for all allowed users, otherwise return only for the specific account object.
Comment #4
deviantintegral commentedA hook issue is all ready open at #324292: Adding hooks into Masquerade, so I'm going to keep this patch to be without the hook.
Comment #5
deviantintegral commentedHere is a reroll of this patch now that #521444: Store user ID's instead of user names for quick switch links has landed.
Comment #6
deviantintegral commentedHere is a re-rolled patch against the latest version. Only major differences are the change to $_SESSION.
Unless anyone posts any issues with this, I'll probably commit it later tonight.
Comment #7
deviantintegral commentedI've committed this.