cool tech graphics

How to improve the default user list using Views in Drupal7

Filed under:

Taking the time to make the Drupal admin friendlier is rarely on the top list of priorities for clients. That said, as service providers we know the long term grief ignoring the admin can cause for administrators. You've heard it before: "How did I do that again?", "Man, I wish this were easier!"

One of the places that you can easily improve the experience is in the user administrative section. Users are really just usernames and roles, but how do you get a better view of the data and make it easier to manage? Creating a custom View with exposed filters is a great first step. Here's a side-by-side comparison of the default user management screen and a custom View I created in about 15 minutes of work:

Default Drupal7 User Admin
fig. 1: Default Drupal7 User Admin
Custom Drupal7 User Admin View
fig. 2: Custom Drupal7 User Admin View

Pretty neat, eh? Not only do we have avatar photos being displayed but we also have leveraged views for:

  • More user information (First Name, Last Name, etc)
  • Dynamic sorting (just click the table header)
  • An add user link at the top and the bottom of the list.
  • Pagination at whatever point we want it.

Since this is a simple View, we haven't done anything to enable to bulk blocking, etc of users so we also include a link to the default user admin. Another thing that you may notice is missing that could be easily added are exposed filters. As of writing this article this feature was busted in Views and Drupal 7, but would be a great and easy addition to a Drupal 6 site you wanted to trick out this way.

Here's a snapshot of the View settings that I used:

The Custom View
fig. 2: The Custom View

I know other people have at least dabbled in this area, so I'd love to hear/see your recipes as well!

Date posted: August 17, 2010


I like it, but can we add an "edit" link to the view?

Great idea, Scott! I just added an edit link by adding another field in the View (to edit). It took about 2 minutes.

Views Link Area is a better way to put a link in the views header, as it runs it through Drupal's l() function. It's for Views 6.x-3.x at present, but hopefully it'll be ported to D7 soon enough.

Please 1. make this a feature 2. make an UberToad distribution that includes all your cool default hacks / features.

Exactly what a client asked last week. Thanks.

Agreed. The Administration Views module is one of the best ones out there. Make for much better Drupal administration.

I created users list in views, but i don't know where i can find the link of it.

sorry, i'm just beginner in drupal hope someone can help me.

Do you created the Type User or this type already exist ? Because I want to make a View with all the Users but in Views I can choose the User type.

How do you dysplay a users roles in last column?

As a suggestion, in the screen shot above, it might be better to show the People display, since unlike the Default display, it shows the path for the display.

i want hidden edit column in user view side.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <cpp>, <java>, <php>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Metal Toad is an Advanced AWS Consulting Partner. Learn more about our AWS Managed Services

About the Author

Joaquin Lippincott, CEO

Joaquin is a 20+ year technology veteran helping to lead businesses in the move to the Cloud. He frequently speaks on panels about the future of tech ranging from IoT and Machine Learning to the latest innovation in the entertainment industry.  He has helped to modernize software for industry leaders like Sony, Daimler, Intel, the Golden Globes, Siemens Wind Power, ABC, NBC, DC Comics, Warner Brothers & the Linux Foundation.

As the CEO and Founder of Metal Toad, an AWS Advanced Consulting Partner, his primary job is to "get the right people in the room".  This one responsibility is cross-functional and includes both external business development functions as well as internal delegation and leadership development.

A UCLA alumni, he also serves in the community as a Board Member for the Los Angeles Area Chamber of Commerce, the Beverly Hills Chamber of Commerce, and Stand for Children Oregon - a public education political advocacy group. As an outspoken advocate for entry-level job creation in tech he helped found the non-profit, P4TH, an organization dedicated to increasing the number of entry-level jobs in the tech industry, and is in the process of organizing an Advisory Board for the Bixel Exchange, a Los Angeles non-profit that provides almost 200 tech internships every year.


Have questions?