function _mailchimp_is_subscribed in Mailchimp 6
Same name and namespace in other branches
- 5.2 mailchimp.module \_mailchimp_is_subscribed()
- 5 mailchimp.module \_mailchimp_is_subscribed()
- 6.2 mailchimp.module \_mailchimp_is_subscribed()
- 7 mailchimp.module \_mailchimp_is_subscribed()
Check if the given user is subscribed to the given list
4 calls to _mailchimp_is_subscribed()
- mailchimp_unsubscribe_form_validate in ./
mailchimp.module - mailchimp_user in ./
mailchimp.module - _mailchimp_subscribe_user in ./
mailchimp.module - Subscribe the given user to the given list if he/she is not already subscribed
- _mailchimp_unsubscribe_user in ./
mailchimp.module - Unsubscribe the given user to the given list
File
- ./
mailchimp.module, line 678 - 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;
}