function simplenews_confirm_removal_form_submit in Simplenews 6.2
Same name and namespace in other branches
- 5 simplenews.module \simplenews_confirm_removal_form_submit()
- 6 simplenews.subscription.inc \simplenews_confirm_removal_form_submit()
- 7.2 includes/simplenews.subscription.inc \simplenews_confirm_removal_form_submit()
- 7 includes/simplenews.subscription.inc \simplenews_confirm_removal_form_submit()
FAPI CONFIRM REMOVAL form_submit.
File
- includes/
simplenews.subscription.inc, line 608 - (Un)subscription and (un)subscription confirmation
Code
function simplenews_confirm_removal_form_submit($form, &$form_state) {
simplenews_unsubscribe_user($form_state['values']['mail'], $form_state['values']['newsletter']->tid, FALSE, 'website');
// Display message if user is directed to the front page.
if (!$form['#redirect']) {
drupal_set_message(t('%user was unsubscribed from the %newsletter mailing list.', array(
'%user' => $form_state['values']['mail'],
'%newsletter' => $form_state['values']['newsletter']->name,
)));
}
}