Skip to content

Instantly share code, notes, and snippets.

@signalpoint
Created June 30, 2015 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save signalpoint/8f7a12c681ecedc17309 to your computer and use it in GitHub Desktop.
Save signalpoint/8f7a12c681ecedc17309 to your computer and use it in GitHub Desktop.
Drupal Check User for Multiple Roles
// Returns true if the account has the 'foo' or 'bar' roles.
return count(array_intersect($account->roles, ['foo', 'bar']));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment