You are here

function mailchimp_update_member in Mailchimp 7.4

Same name and namespace in other branches
  1. 8 mailchimp.module \mailchimp_update_member()
  2. 7.5 mailchimp.module \mailchimp_update_member()
  3. 7.3 mailchimp.module \mailchimp_update_member()
  4. 2.x mailchimp.module \mailchimp_update_member()

Update a members list subscription in real time or by adding to the queue.

Return value

bool Success or failure.

See also

Mailchimp_Lists::updateMember()

2 calls to mailchimp_update_member()
MailchimpListsTestCase::testUpdateMember in modules/mailchimp_lists/tests/mailchimp_lists.test
Tests updating a list member.
mailchimp_lists_process_subscribe_form_choices in modules/mailchimp_lists/mailchimp_lists.module
Processor for various list form submissions.

File

./mailchimp.module, line 763
Mailchimp module.

Code

function mailchimp_update_member($list_id, $email, $merge_vars, $interests, $format = 'html', $double_optin = FALSE) {
  if (variable_get('mailchimp_cron', FALSE)) {
    $args = array(
      'list_id' => $list_id,
      'email' => $email,
      'merge_vars' => $merge_vars,
      'interests' => $interests,
      'format' => $format,
      'double_optin' => $double_optin,
    );
    return mailchimp_addto_queue('mailchimp_update_member_process', $args);
  }
  return mailchimp_update_member_process($list_id, $email, $merge_vars, $interests, $format, $double_optin);
}