I am trying to make a Drupal View which only shows the comments of users with a certain role. For example I have a node with content_author who has Role Y. The same user (with Role Y) placed a comment, another user with Role X posted a comment too.

I want to have a view which only displays comments from users with Role X. This does not depend on the user who is logged in, so I cannot use a contextual filter I suppose.

Did anyone manage to do something like this?


1 Answer 1


I figured out how to do it.

  1. Create a view displaying items of type Node.
  2. Create a relationship Comment:User
  3. Create a filter User: Roles and require Relationship with User (which was created in 2.
  4. Specify the roles

You can style the view (and add fields) as you like.

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.