function user_confirm_delete_submit in Drupal 4
Same name and namespace in other branches
- 5 modules/user/user.module \user_confirm_delete_submit()
- 6 modules/user/user.pages.inc \user_confirm_delete_submit()
File
- modules/
user.module, line 1460 - Enables the user registration and login system.
Code
function user_confirm_delete_submit($form_id, $form_values) {
$account = $form_values['account'];
db_query('DELETE FROM {users} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {sessions} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {users_roles} WHERE uid = %d', $account->uid);
db_query('DELETE FROM {authmap} WHERE uid = %d', $account->uid);
watchdog('user', t('Deleted user: %name %email.', array(
'%name' => theme('placeholder', $account->name),
'%email' => theme('placeholder', '<' . $account->mail . '>'),
)), WATCHDOG_NOTICE);
drupal_set_message(t('The account has been deleted.'));
module_invoke_all('user', 'delete', $form_values, $account);
return 'admin/user';
}