function advuser_multiple_delete_confirm_submit in Advanced User 7.3
Same name and namespace in other branches
- 5.2 advuser.module \advuser_multiple_delete_confirm_submit()
- 5 advuser.module \advuser_multiple_delete_confirm_submit()
- 6.3 forms/advuser_multiple_delete_confirm.inc \advuser_multiple_delete_confirm_submit()
- 6.2 advuser.module \advuser_multiple_delete_confirm_submit()
Submit handler for the "Delete all" button.
File
- forms/
advuser_multiple_delete_confirm.inc, line 74 - Confirm the delete of selected users.
Code
function advuser_multiple_delete_confirm_submit($form, &$form_state) {
$advuser =& $_SESSION['advuser'];
$accounts =& $advuser['accounts'];
if ($form_state['values']['confirm']) {
foreach ($accounts as $uid => $value) {
if ($uid <= 1) {
continue;
}
user_cancel($form_state['values'], $uid, 'user_cancel_delete');
}
drupal_set_message(t('The users have been deleted.'));
}
$form_state['redirect'] = 'admin/people/advuser';
advuser_reset_variables();
}