You are here

function node_registration_delete_confirm_submit in Node registration 7

Execute delete registration.

1 string reference to 'node_registration_delete_confirm_submit'
node_registration_delete_confirm in includes/node_registration.forms.inc
Confirm delete registration.

File

includes/node_registration.forms.inc, line 1220
New registration forms. Public and admin.

Code

function node_registration_delete_confirm_submit($form, &$form_state) {
  $registration = $form['#registration'];
  if ($form_state['values']['confirm']) {

    // Delete.
    node_registration_delete_multiple(array(
      $registration->registration_id,
    ));

    // Notify.
    watchdog('node_registration', 'Registration %id deleted.', array(
      '%id' => $registration->registration_id,
    ));
    drupal_set_message(t('Registration %id has been deleted.', array(
      '%id' => $registration->registration_id,
    )));
  }
  $form_state['redirect'] = 'node/' . $registration->nid;
}