You are here

function simplenews_confirm_add_form_submit in Simplenews 5

Same name and namespace in other branches
  1. 6.2 includes/simplenews.subscription.inc \simplenews_confirm_add_form_submit()
  2. 6 simplenews.subscription.inc \simplenews_confirm_add_form_submit()
  3. 7.2 includes/simplenews.subscription.inc \simplenews_confirm_add_form_submit()
  4. 7 includes/simplenews.subscription.inc \simplenews_confirm_add_form_submit()

Forms API callback; handles form submission for a user confirming subscribe request.

File

./simplenews.module, line 2657

Code

function simplenews_confirm_add_form_submit($form_id, $form_values) {
  simplenews_subscribe_user($form_values['mail'], $form_values['newsletter']->tid, FALSE);
  drupal_set_message(t('%user was successfully added to the %newsletter subscription list.', array(
    '%user' => $form_values['mail'],
    '%newsletter' => $form_values['newsletter']->name,
  )));
  return '';
}