You are here

function _mailchimp_get_api_object in Mailchimp 5.2

Same name and namespace in other branches
  1. 5 mailchimp.module \_mailchimp_get_api_object()
  2. 6.2 mailchimp.module \_mailchimp_get_api_object()
  3. 6 mailchimp.module \_mailchimp_get_api_object()
  4. 7 mailchimp.module \_mailchimp_get_api_object()

Get a Mailchimp API object for communication with the mailchimp server

12 calls to _mailchimp_get_api_object()
mailchimp_bio_nodeapi in ./mailchimp_bio.module
Implementation of hook_nodeapi(). Allows update on bio change
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

... See full list

File

./mailchimp.module, line 790

Code

function _mailchimp_get_api_object() {
  $q = new MCAPI(variable_get('mailchimp_username', ''), variable_get('mailchimp_password', ''));
  if ($q->errorCode) {
    watchdog('mailchimp', $q->errorMessage, WATCHDOG_ERROR);
    return NULL;
  }
  return $q;
}