You are here

public function SubscriptionManagerInterface::isSubscribed in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 src/Subscription/SubscriptionManagerInterface.php \Drupal\simplenews\Subscription\SubscriptionManagerInterface::isSubscribed()
  2. 8 src/Subscription/SubscriptionManagerInterface.php \Drupal\simplenews\Subscription\SubscriptionManagerInterface::isSubscribed()

Check if the email address is subscribed to the given mailing list.

@todo Caching should be done in simplenews_load_user_by_mail().

Parameters

string $mail: The email address to be checked.

string $newsletter_id: The mailing list id.

Return value

bool TRUE if the email address is subscribed; otherwise false.

Related topics

1 method overrides SubscriptionManagerInterface::isSubscribed()
SubscriptionManager::isSubscribed in src/Subscription/SubscriptionManager.php
Check if the email address is subscribed to the given mailing list.

File

src/Subscription/SubscriptionManagerInterface.php, line 82

Class

SubscriptionManagerInterface
Subscription management; subscribe, unsubscribe and get subscription status.

Namespace

Drupal\simplenews\Subscription

Code

public function isSubscribed($mail, $newsletter_id);