6

In my D7 installation I'd like to have a view where all roles are listed followed by the number of users that have that particular role.

i.e. of my expected result:

  1. role 1: 2
  2. role 2: 5
  3. role 3: 1
  4. role 4: 8

In addition to this, when I can exclude a role (the admin role) from this view, it would make my day...

Thanks for your support!

1
  • Is custom PHP-code an option? It's easily done with it.
    – Michiel
    Commented Jan 23, 2012 at 14:18

1 Answer 1

6

Create a User View. Then add a "Contextual Filter" for the field "User: Roles". Set the "When the filter value is NOT available" option to "Display Summary" and leave all the other settings. Now you should get the list you want ...

Check the other settings for any customization of the list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.