Broadstreet blog

Drupal's Masquerade Module

← All blog posts
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!

More from the blog

September 26, 2008

HTML HREF Target - Why didn't I know that?

I've been coding HTML for over 12 years and today reminded me that it's never too late to learn something new. I don't know why I didn't know this but…

September 26, 2008

More Drupal Modules for this Blog

I finally set my mind to several things I'd like to blog about, and then I realize I've got this "build-it-yourself" blogging tool called Drupal.

September 26, 2008

Notifcation of Blog Comments in Drupal 6.x

I was looking around my blog site today and realized that my friend MCarnell had not only created an account for himself but also left a comment on my…

Let’s get your phone ringing

Book a free, no-pressure consultation. We’ll review your website and Google presence and show you where you can grow.

Call nowFree consult