Views boolean column if user has a specific role I have a standard Drupal installation with Views and Administration Views modules installed.

By default, the Users view has a column Roles with ALL the users roles.

How to include a custom column (to replace the default Roles column) to show if the user has or hasn't a specific role (like a yes/no column)?
I don't see an out of the box method. Maybe someone else will have a better answer. But what I did for a quick solutions is to add the Views PHP module, then add a PHP field with the following output code:

&lt;?php 

  $account = user_load($data-&gt;uid);

  $roles = array('YOURROLE', 'ANOTHER ROLE');

  if (count(array_intersect($roles, $account-&gt;roles))) {
    print 'Yes';
  }
  else {
    print  'No';
  }

?&gt;


It will print yes if any user has either of the two roles.