You are here

function mailchimp_rebuild_users in Mailchimp 6.2

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

Rebuild the MailChimp users's table.

1 string reference to 'mailchimp_rebuild_users'
mailchimp_menu in ./mailchimp.module
Implementation of hook_menu.

File

./mailchimp.module, line 1119
Mailchimp module.

Code

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