You are here

function simplenews_subscriber_load_by_mail in Simplenews 7.2

Same name and namespace in other branches
  1. 8 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

SimplenewsSubscriber Newsletter subscriber object, FALSE if subscriber does not exist.

Related topics

24 calls to simplenews_subscriber_load_by_mail()
SimpleNewsAdministrationTestCase::testSubscriptionManagement in tests/simplenews.test
Test newsletter subscription management.
SimplenewsSourceTestCase::testSendMissingSubscriber in tests/simplenews.test
Test with disabled caching.
SimplenewsSpool::nextSource in includes/simplenews.source.inc
Implements SimplenewsSpoolInterface::nextSource();
SimplenewsSubscribeTestCase::testSubscribeAnonymous in tests/simplenews.test
testSubscribeAnonymous
SimplenewsSubscribeTestCase::testSubscribeAnonymousSingle in tests/simplenews.test
Test anonymous subscription with single opt in.

... See full list

File

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

Code

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