You are here

function advuser_multiple_delete_confirm_submit in Advanced User 6.2

Same name and namespace in other branches
  1. 5.2 advuser.module \advuser_multiple_delete_confirm_submit()
  2. 5 advuser.module \advuser_multiple_delete_confirm_submit()
  3. 6.3 forms/advuser_multiple_delete_confirm.inc \advuser_multiple_delete_confirm_submit()
  4. 7.3 forms/advuser_multiple_delete_confirm.inc \advuser_multiple_delete_confirm_submit()

File

./advuser.module, line 347
Advanced user module allows you to select users based on an advanced set of filtering and apply actions to block, unblock, delete or email the selected users.

Code

function advuser_multiple_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    foreach ($form_state['values']['accounts'] as $uid => $value) {
      user_delete($form_state['values'], $uid);
    }
    drupal_set_message(t('The users have been deleted.'));
  }
  $form_state['redirect'] = 'admin/user/user/advuser';
}