You are here

function _mailchimp_get_required_lists in Mailchimp 7

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

Return an array of all required lists.

3 calls to _mailchimp_get_required_lists()
mailchimp_cron in ./mailchimp.module
Implements hook_cron().
mailchimp_user_delete in ./mailchimp.module
Implements hook_user_delete().
mailchimp_user_update in ./mailchimp.module
Implements hook_user_update().

File

./mailchimp.module, line 896
Mailchimp module.

Code

function _mailchimp_get_required_lists() {
  $lists = variable_get('mailchimp_lists', NULL);
  if (is_array($lists)) {
    foreach ($lists as $key => $list) {
      if ($list->listtype !== MAILCHIMP_LISTTYPE_REQUIRED) {
        unset($lists[$key]);
      }
    }
  }
  return $lists;
}