Created
June 29, 2016 10:19
-
-
Save zuhairkareem/1cfe196c3799e24b88e399d6dbb3cbad to your computer and use it in GitHub Desktop.
Get all the users with particulare role.
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
$query = \Drupal::service('entity_type.manager')->getStorage('user')->getQuery(); | |
$query->condition('roles', 'administrator'); | |
$query->execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment