You are here

function campaignmonitor_is_subscribed in Campaign Monitor 8

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

Parameters

string $list_id: Unique string identifier for the list on your CampaignMonitor account.

string $email: Email address to check for on the identified CampaignMonitor List.

Return value

bool TRUE if subscribed, FALSE otherwise.

5 calls to campaignmonitor_is_subscribed()
CampaignMonitorSubscribeForm::singleSubscribeForm in src/Form/CampaignMonitorSubscribeForm.php
CampaignMonitorUserSubscriptionForm::buildForm in modules/campaignmonitor_user/src/Form/CampaignMonitorUserSubscriptionForm.php
Form constructor.
campaignmonitor_ics_get_user_subscriptions in modules/campaignmonitor_ics/campaignmonitor_ics.module
Helper function to get a user's subscriptions.
campaignmonitor_unsubscribe in ./campaignmonitor.module
Unsubscribes a member from a CampaignMonitor list.
campaignmonitor_user_get_user_subscriptions in modules/campaignmonitor_user/campaignmonitor_user.module
Helper function to get a user's subscriptions.

File

./campaignmonitor.module, line 301
Module that plugs in Campaign Monitor functionality to your Drupal web site. For Campaign Monitor information see: http://www.campaignmonitor.com/.

Code

function campaignmonitor_is_subscribed($list_id, $email) {
  $cm = CampaignMonitor::getConnector();
  if ($cm
    ->isSubscribed($list_id, $email)) {
    return TRUE;
  }
  return FALSE;
}