You are here

function simplenews_subscriber_load_by_mail in Simplenews 8

Same name and namespace in other branches
  1. 7.2 simplenews.module \simplenews_subscriber_load_by_mail()
  2. 7 simplenews.module \simplenews_subscriber_load_by_mail()

Load a simplenews newsletter subscriber object.

Parameters

$mail: Subscriber e-mail address.

Return value

\Drupal\simplenews\SubscriberInterface Newsletter subscriber object, FALSE if subscriber does not exist.

Related topics

23 calls to simplenews_subscriber_load_by_mail()
Mailer::sendTest in src/Mail/Mailer.php
Send test version of newsletter.
SimplenewsAdministrationTest::testNewsletterSettings in src/Tests/SimplenewsAdministrationTest.php
Test various combinations of newsletter settings.
SimplenewsAdministrationTest::testSubscriptionManagement in src/Tests/SimplenewsAdministrationTest.php
Test newsletter subscription management.
SimplenewsSourceTest::testSendMissingSubscriber in src/Tests/SimplenewsSourceTest.php
Test sending when there are no subscribers.
SimplenewsSubscribeTest::testSubscribeAnonymous in src/Tests/SimplenewsSubscribeTest.php
testSubscribeAnonymous

... See full list

File

./simplenews.module, line 611
Simplenews node handling, sent email, newsletter block and general hooks

Code

function simplenews_subscriber_load_by_mail($mail) {
  $subscribers = entity_load_multiple_by_properties('simplenews_subscriber', array(
    'mail' => $mail,
  ));
  return $subscribers ? reset($subscribers) : FALSE;
}