function notifications_form_subscribe_confirm_submit in Notifications 6.3
Same name and namespace in other branches
- 6 notifications.pages.inc \notifications_form_subscribe_confirm_submit()
- 6.2 notifications.pages.inc \notifications_form_subscribe_confirm_submit()
Process form submission
File
- ./
notifications.pages.inc, line 250 - User pages for Notifications
Code
function notifications_form_subscribe_confirm_submit($form, &$form_state) {
$subscription = (object) $form_state['values'];
switch ($form_state['values']['op']) {
case t('Subscribe'):
notifications_save_subscription($subscription);
drupal_set_message(t('Your subscription was activated.'));
$form_state['redirect'] = 'notifications/subscription/' . $subscription->sid;
break;
case t('Cancel'):
drupal_set_message(t('Your subscription was cancelled'));
$form_state['redirect'] = 'user/' . $subscription->uid . '/notifications';
break;
}
}