function _mailchimp_get_api_object in Mailchimp 6
Same name and namespace in other branches
- 5.2 mailchimp.module \_mailchimp_get_api_object()
- 5 mailchimp.module \_mailchimp_get_api_object()
- 6.2 mailchimp.module \_mailchimp_get_api_object()
- 7 mailchimp.module \_mailchimp_get_api_object()
Get a Mailchimp API object for communication with the mailchimp server
11 calls to _mailchimp_get_api_object()
- mailchimp_cron in ./
mailchimp.module - Implementation of hook_cron. Resubscribes all users to the required lists if the user has chosen to do so.
- mailchimp_subscribe_form in ./
mailchimp.module - mailchimp_subscribe_form_submit in ./
mailchimp.module - mailchimp_unsubscribe_form_submit in ./
mailchimp.module - mailchimp_unsubscribe_form_validate in ./
mailchimp.module
File
- ./
mailchimp.module, line 779 - Mailchimp module.
Code
function _mailchimp_get_api_object() {
module_load_include('php', 'mailchimp', 'MCAPI.class');
$q = new MCAPI(variable_get('mailchimp_username', ''), variable_get('mailchimp_password', ''));
if ($q->errorCode) {
watchdog('mailchimp', $q->errorMessage, array(), WATCHDOG_ERROR);
return NULL;
}
return $q;
}