Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $Db, $Subscriber, $SubscribersList;
- //Find a subscriber via email
- $Db -> model = $Subscriber -> model;
- $email = 'email@domain.com'; //A valid email address
- $subscriber = $Db -> find(array('email' => $email));
- //Remove a subscription
- $Db -> model = $SubscribersList -> model;
- $subscriber_id = $subscriber -> id; //from above $subscriber object
- $list_id = '3'; //The ID of the mailing list subscribed to
- $Db -> delete_all(array('subscriber_id' => $subscriber_id, 'list_id' => $list_id));
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement