function user_confirm_delete_submit

6.x user.pages.inc user_confirm_delete_submit($form, &$form_state)

Submit function for the confirm form for user deletion.

File

drupal-6.x/modules/user/user.pages.inc, line 333
User page callback file for the user module.

Code

function user_confirm_delete_submit($form, &$form_state) {
  user_delete($form_state['values'], $form_state['values']['_account']->uid);
  drupal_set_message(t('%name has been deleted.', array('%name' => $form_state['values']['_account']->name)));

  if (!isset($_REQUEST['destination'])) {
    $form_state['redirect'] = 'admin/user/user';
  }
}