You are here

function simplenews_subscription_multiple_delete_confirm_submit in Simplenews 5

Same name and namespace in other branches
  1. 6.2 includes/simplenews.admin.inc \simplenews_subscription_multiple_delete_confirm_submit()
  2. 6 simplenews.admin.inc \simplenews_subscription_multiple_delete_confirm_submit()

File

./simplenews.module, line 2077

Code

function simplenews_subscription_multiple_delete_confirm_submit($form_id, $form_values) {
  if ($form_values['confirm']) {
    foreach ($form_values['snids'] as $snid => $value) {
      simplenews_delete_subscription($snid);
    }
    drupal_set_message(t('The subscriptions have been deleted.'));
  }

  // Route the user back to the subscription admin form
  return 'admin/content/newsletters/users';
}