Exercise 8.9: Edit the existing view to filter out roles
As seen in the screenshot from the previous exercise, the view we built shows the site administrator user. If we had multiple users in the Site Administrator role, all administrators would be listed here, in our view. In this exercise we hide those administrator users, by adding a role filter to our view.
Go to Structure → Views and locate our Members view. Click the Edit button.
Click the Add button next to the Filter Criteria section.
Search for “roles” and select Roles filter. Apply the changes.
In the next screen, select Is none of operator and select the Site Builder in the Options list.
Apply your changes and preview the result below.
Save the view and review the Members page. You shouldn’t see any users who have the Site Builder role.
Last updated