You are here

function mailchimp_activity_get_all_activity in Mailchimp 7.4

Same name and namespace in other branches
  1. 7.5 modules/mailchimp_activity/mailchimp_activity.module \mailchimp_activity_get_all_activity()
  2. 7.2 modules/mailchimp_activity/mailchimp_activity.module \mailchimp_activity_get_all_activity()
  3. 7.3 modules/mailchimp_activity/mailchimp_activity.module \mailchimp_activity_get_all_activity()

Return all activity on all lists for a given email address.

Parameters

string $email: The email address to get activity for.

Return value

array Array of Mailchimp activity for the email address.

1 call to mailchimp_activity_get_all_activity()
mailchimp_activity_page in modules/mailchimp_activity/mailchimp_activity.module
Content for the mailchimp log tab on entity instance pages.

File

modules/mailchimp_activity/mailchimp_activity.module, line 279
Module file for mailchimp_activity.

Code

function mailchimp_activity_get_all_activity($email) {
  $all_activity = array();
  $lists = mailchimp_get_lists_for_email($email);
  foreach ($lists as $list) {
    $all_activity[$list->id] = array(
      'list' => $list,
      'activity' => mailchimp_activity_get_member_activity($list->id, $email),
    );
  }
  return $all_activity;
}