Programmatically subscribing all users to Mailchimp list with module I've installed the Mailchimp plugin and added a field to my user profile called field_mailchimp_test and I'm attempting to subscribe all current Drupal users to this list programmatically (since it seems this feature was taken out of the 7.3 branch for whatever reason).

I attempted this code:

function module_mailchimp_subscribe() {
  $users = entity_load('user');
  foreach ($users as $key =&gt; $user) {
    if ($user-&gt;uid != 1 &amp;&amp; !empty($user-&gt;mail)) {
      $edit = array(
        'field_mailchimp_test' =&gt; array(
          'und' =&gt; array(
            0 =&gt; array(
              'value' =&gt; true
              )
            )
          )
        );
      var_dump(user_save($user, $edit)); exit;
    }
  }
}


Which returns a user object with the field_mailchimp_test field set to true, which I would think would subscribe them, but when checking the users page and/or var_dumping the user object, the field is no longer set to true.

So my question is either what is wrong with my code that it's not subscribing users, or what is a different (easier/more sensical) way of doing this?
I'm pretty sure the MailChimp module doesn't actually store user subscriptions in the Drupal database, it picks up data from the MailChimp API when required.

What worked for me was to export all my Drupal users and import them into MailChimp through their website.  This is fine for a once-off, and you should be able to handle new and updated users directly through the module.