You are here

function _mailchimp_get_required_lists in Mailchimp 5

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

Get all of the lists that the given user must be subscribed to

1 call to _mailchimp_get_required_lists()
mailchimp_cron in ./mailchimp.module
Implementation of hook_cron. Resubscribes all users to the required lists if the user has chosen to do so.

File

./mailchimp.module, line 760

Code

function _mailchimp_get_required_lists($lists) {
  foreach ($lists as $key => $list) {
    if (variable_get('mailchimp_list_' . $list['id'] . '_listtype', '') !== 'required') {
      unset($lists[$key]);
    }
  }
  return $lists;
}