protected function RecipientHandlerNewUsers::buildEntityQuery in Simplenews 8.2
Same name and namespace in other branches
- 3.x modules/simplenews_demo/src/Plugin/simplenews/RecipientHandler/RecipientHandlerNewUsers.php \Drupal\simplenews_demo\Plugin\simplenews\RecipientHandler\RecipientHandlerNewUsers::buildEntityQuery()
Build the query that gets the list of subscribers.
Return value
\Drupal\Core\Entity\Query\QueryInterface Entity query on 'simplenews_subscriber' or 'user'.
Overrides RecipientHandlerEntityBase::buildEntityQuery
File
- modules/
simplenews_demo/ src/ Plugin/ simplenews/ RecipientHandler/ RecipientHandlerNewUsers.php, line 20
Class
- RecipientHandlerNewUsers
- This handler sends to all active users that have never logged in.
Namespace
Drupal\simplenews_demo\Plugin\simplenews\RecipientHandlerCode
protected function buildEntityQuery() {
return \Drupal::entityQuery('user')
->exists('mail')
->condition('access', 0)
->condition('status', TRUE);
}