You are here

function simplenews_subscriber_load in Simplenews 8

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

Load a simplenews newsletter subscriber object.

Parameters

$snid: Simplenews subscriber ID.

Return value

Subscriber Newsletter subscriber entity, FALSE if subscriber does not exist.

Related topics

4 calls to simplenews_subscriber_load()
ConfirmationController::confirmCombined in src/Controller/ConfirmationController.php
Menu callback: confirm a combined confirmation request.
ConfirmationController::confirmSubscription in src/Controller/ConfirmationController.php
Menu callback: confirm the user's (un)subscription request
SubscriberExportForm::getEmails in src/Form/SubscriberExportForm.php
Implement getEmails($states, $subscribed, $newsletters)
SubscriptionsPageForm::buildForm in src/Form/SubscriptionsPageForm.php
Form constructor.

File

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

Code

function simplenews_subscriber_load($snid) {
  $subscribers = simplenews_subscriber_load_multiple(array(
    $snid,
  ));
  return $subscribers ? reset($subscribers) : FALSE;
}