Drupal's Masquerade Module

I read something a few months back about a module, Masquerade, that let's a Drupal administrator impersonate other users. This is very useful when testing. You want to be able to see what an anonymous user would see or what a "contributor" can see, etc., which hopefully is just a subset of what the Administrator can see. The masquerade module has no documentation that I could find. Yes, it is pretty simple but still a little quirky. My biggest problem with new Drupal modules is still (after nearly a year of Drupalling): 1.) Finding the module on the modules page. For masquerade, they put the module under a section called Administration. When you have 20 modules installed, each with sub-modules, it can be quite difficult to find a module if it doesn't put it in an easy to find place. For example, I was looking for this one under "M" for masquerade-- silly me. 2.) Remembering to Activate the module. After I found it, I then forgot to click the check box. Then of course I couldn't find the page to configure it because it wasn't activated. 3.) Once it's activated, find the configuration page. This one was pretty standard-- site configuration / Masquerade. 4.) Remember to give the Administrator rights to the module. (I forgot this one tonight and spend 20 minutes looking for the configuration page and the menu. Duh) For Masquerade, the next part was a little tricky. I had to figure out which user I would want to impersonate the most (this one would appear as a menu item) and then a list of users I might want to use less frequently (this group appears as a quick switch). I decided to create two new users-- one to impersonate an authenticated user with no permissions, and one to impersonate a "contributor." Unfortunately, I'm pretty sure there's no way to impersonate an anonymous user. If there is I haven't found it yet. To do that I guess I still have to log out and log back in. Once I got it working it is quite nice. I can swith from administrator to authenticated user any time, and with the click a button I can "switch back." Very nice!

Tags: 

About the Author:

Tom Sliker

President / CEO / Lead Consultant

Tom Sliker serves as the ringleader for the Broadstreet team and has managed to build a diverse, talented, multi-faceted team that has performed a wide range of projects.   With over 30 years of software development and integration experience, Tom brings a wealth of technical and business knowledge to his customers and his team.