You are here

function mailchimp_rebuild_users in Mailchimp 7

Same name and namespace in other branches
  1. 6.2 mailchimp.module \mailchimp_rebuild_users()

Rebuild the MailChimp users's table.

1 string reference to 'mailchimp_rebuild_users'
mailchimp_menu in ./mailchimp.module
Implements hook_menu().

File

./mailchimp.module, line 966
Mailchimp module.

Code

function mailchimp_rebuild_users() {
  db_query("DELETE FROM {mailchimp_user}");
  db_query("INSERT INTO {mailchimp_user} (uid, status) SELECT uid, '" . MAILCHIMP_USERSTATUS_PENDING . "' FROM {users} WHERE uid > 0");
  drupal_set_message('The MailChimp User\'s Table has been rebuilt with all user\'s status set to pending.', 'status');
  drupal_goto('admin/config/services/mailchimp');
}