Created
October 21, 2020 21:38
-
-
Save mstekl/2a32effc368d69f3901b3ceb524ecfbc to your computer and use it in GitHub Desktop.
Drupal 8 query users with boolean field != true and a specific role
This file contains hidden or 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::entityQuery('user') | |
->condition('roles', 'myRole', 'CONTAINS'); | |
$group = $query->orConditionGroup() | |
->notExists('field_processed') | |
->condition('field_processed', 1, '<>'); | |
$ids = $query->condition($group)->execute(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment