RecipientHandlerNewUsers.php in Simplenews 3.x
Same filename and directory in other branches
File
modules/simplenews_demo/src/Plugin/simplenews/RecipientHandler/RecipientHandlerNewUsers.phpView source
<?php
namespace Drupal\simplenews_demo\Plugin\simplenews\RecipientHandler;
use Drupal\simplenews\Plugin\simplenews\RecipientHandler\RecipientHandlerEntityBase;
/**
* This handler sends to all active users that have never logged in.
*
* @RecipientHandler(
* id = "simplenews_new_users",
* title = @Translation("New users")
* )
*/
class RecipientHandlerNewUsers extends RecipientHandlerEntityBase {
/**
* {@inheritdoc}
*/
protected function buildEntityQuery() {
return \Drupal::entityQuery('user')
->exists('mail')
->condition('access', 0)
->condition('status', TRUE);
}
/**
* {@inheritdoc}
*/
protected function cacheCount() {
return TRUE;
}
}
Classes
Name | Description |
---|---|
RecipientHandlerNewUsers | This handler sends to all active users that have never logged in. |