function constant_contact_unsubscribe_confirm in Constant Contact 6
Same name and namespace in other branches
- 5 constant_contact.module \constant_contact_unsubscribe_confirm()
Implementation of hook_form() confirm unsubscribe
1 string reference to 'constant_contact_unsubscribe_confirm'
- constant_contact_menu in ./
constant_contact.module - Implementation of hook_menu().
File
- ./
constant_contact.module, line 313
Code
function constant_contact_unsubscribe_confirm($list = NULL) {
$lists = constant_contact_get_lists();
$list = urldecode($list);
if (empty($list) || !array_search($list, $lists)) {
drupal_set_message(t('Invalid list name.'), 'error');
return drupal_goto($_GET['destination'] ? $_GET['destination'] : '<front>');
}
$form['list'] = array(
'#type' => 'hidden',
'#value' => $list,
);
$form = confirm_form($form, t('Are you sure you want to unsubscribe from %list?', array(
'%list' => $list,
)), $_GET['destination'] ? $_GET['destination'] : '<front>', t('You must be logged in and subscribed under your account email, for this to work.'), t('Unsubscribe'), t('Cancel'));
return $form;
}