function notifications_form_unsubscribe_confirm_submit in Notifications 6
Same name and namespace in other branches
- 5 notifications.admin.inc \notifications_form_unsubscribe_confirm_submit()
- 6.4 notifications.pages.inc \notifications_form_unsubscribe_confirm_submit()
- 6.2 notifications.pages.inc \notifications_form_unsubscribe_confirm_submit()
- 6.3 notifications.pages.inc \notifications_form_unsubscribe_confirm_submit()
Process form submission
File
- ./
notifications.pages.inc, line 354 - User pages for Notifications
Code
function notifications_form_unsubscribe_confirm_submit($form, &$form_state) {
$subscription = $form_state['values']['subscription'];
$account = $form_state['values']['account'];
switch ($form_state['values']['op']) {
case t('Unsubscribe'):
if ($subscription) {
notifications_delete_subscription($subscription->sid);
drupal_set_message(t('Your subscription has been removed.'));
}
elseif ($account) {
notifications_delete_subscriptions(array(
'uid' => $account->uid,
));
drupal_set_message(t('All your subscriptions have been removed.'));
}
break;
case t('Cancel'):
// Do nothing, not worth showing a message, just get back
break;
}
}