Skip to content

Commit

Permalink
Adds an example to check if a user exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkornatz committed Apr 18, 2017
1 parent 282f897 commit 7355d8a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ $resubscribe = false;
craft()->oneCampaignMonitor_subscribers->add($list_id, $email, $name, $customFields, $resubscribe);
```

Update a user in a list:
Update a subscriber in a list:

```
$list_id = '123';
Expand All @@ -135,6 +135,16 @@ $resubscribe = true;
craft()->oneCampaignMonitor_subscribers->update($list_id, $email, $name, $customFields, $resubscribe);
```

Determine if a subscriber exists in a list:

```
$list_id = '123';
$email = 'email@email.com';
if (craft()->oneCampaignMonitor_subscribers->exists($list_id, $email)) {
// subscriber exists
}
```

### Checking if the user has subscribed to a list

You can check in a template if the current user (by session) has already subscribed to a list:
Expand Down

0 comments on commit 7355d8a

Please sign in to comment.