function _subscriptions_user_suspend_form_submit in Subscriptions 2.0.x
Same name and namespace in other branches
- 7 subscriptions.admin.inc \_subscriptions_user_suspend_form_submit()
User suspend subform submit handler.
_state
Parameters
array $form:
1 string reference to '_subscriptions_user_suspend_form_submit'
- subscriptions_user_suspend_form in ./
subscriptions.admin.old.php - Returns the form definition for the suspend part of the overview page.
File
- ./
subscriptions.admin.old.php, line 503 - Subscriptions module (load-on-demand admin functions).
Code
function _subscriptions_user_suspend_form_submit(array $form, array &$form_state) {
$form_values = $form_state['values'];
if ($form_values['op'] == $form_values['save_notifications']) {
$uid = $form_values['uid'];
$suspended = $form_values['state'];
if ($suspended == -1) {
db_delete('subscriptions_queue')
->condition('uid', $uid)
->condition('suspended', 0, '<>')
->execute();
$suspended = 0;
}
_subscriptions_user_suspend($uid, $suspended);
drupal_set_message(t('The changes have been saved.'));
}
}