You are here

public function CampaignMonitor::isSubscribed in Campaign Monitor 7

Check if a given user, identified by e-mail address, is subscribed.

Parameters

string $list_id: The unique Campaign Monitor list ID.

string $email: The user's e-mail address.

Return value

bool TRUE if subscribed, FALSE if not.

File

lib/campaignmonitor.class.inc, line 875
Implementation of the CampaignMonitor class.

Class

CampaignMonitor
Implementation of the CampaignMonitor class.

Code

public function isSubscribed($list_id, $email) {
  $result = $this
    ->getSubscriber($list_id, $email);
  if (!empty($result)) {
    if ($result['State'] == 'Active') {
      return TRUE;
    }
  }
  return FALSE;
}