You are here

function user_confirm_delete_submit in Drupal 6

Same name and namespace in other branches
  1. 4 modules/user.module \user_confirm_delete_submit()
  2. 5 modules/user/user.module \user_confirm_delete_submit()

Submit function for the confirm form for user deletion.

File

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';
  }
}