function _mailchimp_is_subscribed in Mailchimp 6.2
Same name and namespace in other branches
- 5.2 mailchimp.module \_mailchimp_is_subscribed()
- 5 mailchimp.module \_mailchimp_is_subscribed()
- 6 mailchimp.module \_mailchimp_is_subscribed()
- 7 mailchimp.module \_mailchimp_is_subscribed()
Check if the given user is subscribed to the given list
3 calls to _mailchimp_is_subscribed()
- mailchimp_subscribe_auth_form_submit in ./
mailchimp.module - Submit handler to add users to lists when editing/creating a user
- _mailchimp_subscribe_user in ./
mailchimp.module - Subscribe or update a user in a givne list
- _mailchimp_unsubscribe_user in ./
mailchimp.module - Unsubscribe the given user from the given list
File
- ./
mailchimp.module, line 948 - Mailchimp module.
Code
function _mailchimp_is_subscribed($listid, $mail, $q = NULL) {
$is_subscribed = FALSE;
if ($q || ($q = _mailchimp_get_api_object())) {
$sub_info = $q
->listMemberInfo($listid, $mail);
$is_subscribed = @$sub_info['status'] == 'subscribed';
}
return $is_subscribed;
}