Created
June 30, 2015 19:40
-
-
Save signalpoint/8f7a12c681ecedc17309 to your computer and use it in GitHub Desktop.
Drupal Check User for Multiple Roles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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