You are here

function newsletter_unsubscribe in Newsletter 7

Unsubscribes a subscriber from newsletter.

1 string reference to 'newsletter_unsubscribe'
newsletter_menu in ./newsletter.module
Implements hook_menu().

File

includes/newsletter.pages.inc, line 180
Functions and forms for the frontend part of newsletter module.

Code

function newsletter_unsubscribe($form, &$form_state, $subscriber) {
  if ($subscriber) {
    $form['#subscriber'] = $subscriber;
    return confirm_form($form, t('Are you sure you want to unsubscribe from our newsletters?'), '<front>');
  }
  drupal_set_message(t('The hash you provided is invalid or outdated'), 'warning');
  drupal_goto();
}