### Eclipse Workspace Patch 1.0
#P crv2
Index: www/sites/all/modules/user_delete/user_delete.admin.inc
===================================================================
--- www/sites/all/modules/user_delete/user_delete.admin.inc	(revision 45)
+++ www/sites/all/modules/user_delete/user_delete.admin.inc	(working copy)
@@ -22,16 +22,11 @@
     '#title' => t('Defaults'),
   );
   $form['defaults']['user_delete_default_action'] = array(
-    '#type' => 'select',
+    '#type' => 'checkboxes',
     '#title' => t('Default action when deleting'),
-    '#default_value' => variable_get('user_delete_default_action', 0),
-    '#options' => array(
-        0 => t('Let users choose action'),
-        'user_delete_block' => t('Disable the account and keep all content.'),
-        'user_delete_block_unpublish' => t('Disable the account and unpublish all content.'),
-        'user_delete_reassign' => t('Delete the account and make all content belong to the <em>Anonymous user</em>.'),
-        'user_delete_delete' => t('Delete the account and all content.'),
-      ),
+    '#description' => t('If you check more than one option, the user will have to choose.'),
+    '#default_value' => variable_get('user_delete_default_action', array(1, 2, 3, 4)),
+    '#options' => _user_delete_options(array(1, 2, 3, 4)),
   );
   $form['redirect'] = array(
     '#type' => 'fieldset',
@@ -71,3 +66,9 @@
   );
   return system_settings_form($form);
 }
+
+function user_delete_settings_validate($form, $form_state) {
+  if (!count(array_filter($form_state['values']['user_delete_default_action']))) {
+    form_set_error('user_delete_default_action', t('At least one option must be checked.'));
+  }
+}
\ No newline at end of file
Index: www/sites/all/modules/user_delete/user_delete.install
===================================================================
--- www/sites/all/modules/user_delete/user_delete.install	(revision 45)
+++ www/sites/all/modules/user_delete/user_delete.install	(working copy)
@@ -23,3 +23,31 @@
       break;
   }
 }
+
+/**
+ * Implementation of hook_update_N().
+ * Updates 'user_delete_default_action' value.
+ */
+function user_delete_update_6100() {
+  $default_op = variable_get('user_delete_default_action', array(1, 2, 3, 4));
+  switch ($default_op) {
+    case 'user_delete_block':
+      $variable = array(1);
+      break;
+    case 'user_delete_block_unpublish':
+      $variable = array(2);
+      break;
+    case 'user_delete_reassign':
+      $variable = array(3);
+      break;
+    case 'user_delete_delete':
+      $variable = array(4);
+      break;
+    case 0: // no break is intentional
+    default:
+      $variable = array(1, 2, 3, 4);
+      break;
+  }
+  variable_set('user_delete_default_action', $variable);
+  return array();
+}
\ No newline at end of file
Index: www/sites/all/modules/user_delete/user_delete.module
===================================================================
--- www/sites/all/modules/user_delete/user_delete.module	(revision 45)
+++ www/sites/all/modules/user_delete/user_delete.module	(working copy)
@@ -21,6 +21,7 @@
 
 define('USER_DELETE_FILE_PATH', file_directory_path() .'/user_delete_backup');
 
+
 /**
  * Implementation of hook_perm().
  */
@@ -80,61 +81,73 @@
 
   if ($form_id == 'user_confirm_delete') {
     $description = '';
-    $default_op = variable_get('user_delete_default_action', 0);
-    if ($default_op) {
-      switch ($default_op) {
-        case 'user_delete_block':
+    $default_actions = array_filter(variable_get('user_delete_default_action', array(1, 2, 3, 4)));
+    if (count($default_actions) == 1) {
+      $default_action = array_pop($default_actions);
+      switch ($default_action) {
+        case 1:
           $description = t('The account will be disabled, all submitted content will be kept.');
           break;
-        case 'user_delete_block_unpublish':
+        case 2:
           $description = t('The account will be disabled, all submitted content will be unpublished.');
           break;
-        case 'user_delete_reassign':
+        case 3:
           $description = t('The account will be deleted, all submitted content will be reassigned to the <em>Anonymous user</em>. This action cannot be undone.');
           break;
-        case 'user_delete_delete':
+        case 4:
           $description = t('The account and all submitted content will be deleted. This action cannot be undone.');
           break;
       }
-  
+
       $form['description'] = array(
         '#value' => $description,
         '#weight' => -10,
       );
-    }
-
-    if (variable_get('user_delete_backup', 0)) {
-      $form['user_delete_remark'] = array(
-        '#value' => t('All data that is being deleted will be backed up for %period and automatically deleted afterwards.', array('%period' => format_interval(variable_get('user_delete_backup_period', 60*60*24*7*12), 2))),
-        '#weight' => -10,
+      $form['user_delete_action'] = array(
+        '#type' => 'value',
+        '#value' => $default_action,
       );
     }
-    if (!variable_get('user_delete_default_action', 0)) {
+    else {
       $form['user_delete_action'] = array(
         '#type' => 'radios',
         '#title' => t('When deleting the account'),
         '#default_value' => 'user_delete_block',
-        '#options' => array(
-          'user_delete_block' => t('Disable the account and keep all content.'),
-          'user_delete_block_unpublish' => t('Disable the account and unpublish all content.'),
-          'user_delete_reassign' => t('Delete the account and make all content belong to the <em>Anonymous user</em>.'),
-          'user_delete_delete' => t('Delete the account and all content.'),
-        ),
+        '#options' => _user_delete_options($default_actions),
         '#weight' => 0,
       );
     }
+
+    if (variable_get('user_delete_backup', 0)) {
+      $form['user_delete_remark'] = array(
+        '#value' => t('All data that is being deleted will be backed up for %period and automatically deleted afterwards.', array('%period' => format_interval(variable_get('user_delete_backup_period', 60*60*24*7*12), 2))),
+        '#weight' => -10,
+      );
+    }
     $form['#redirect'] = 'user/' . $form['_account']['#value']->uid;
     $form['#submit'] = array('user_delete_submit');
   }
 }
 
+function _user_delete_options($keys) {
+  $all_options = array(
+    1 => t('Disable the account and keep all content.'),
+    2 => t('Disable the account and unpublish all content.'),
+    3 => t('Delete the account and make all content belong to the <em>Anonymous user</em>.'),
+    4 => t('Delete the account and all content.'),
+  );
+  $options = array();
+  foreach ($keys as $key) {
+    $options[$key] = $all_options[$key];
+  }
+  return $options;
+}
+
 /**
  * Deal with the user/content after form submission
  */
 function user_delete_submit($form, &$form_state) {
   global $user;
-  $default_op = variable_get('user_delete_default_action', 0);
-  $op = ($default_op) ? $default_op : $form_state['values']['user_delete_action'];
   $uid = $form_state['values']['_account']->uid;
   $account = user_load(array('uid' => $uid));
   $backup = variable_get('user_delete_backup', 0);
@@ -145,13 +158,13 @@
     return;
   }
 
-  switch ($op) {
-    case 'user_delete_block':
+  switch ($form_state['values']['user_delete_action']) {
+    case 1:
       // block user
       db_query("UPDATE {users} SET status = 0 WHERE uid = %d", $uid);
       drupal_set_message(t('%name has been blocked.', array('%name' => check_plain($account->name))));
       break;
-    case 'user_delete_block_unpublish':
+    case 2:
       // block user
       db_query("UPDATE {users} SET status = 0 WHERE uid = %d", $uid);
       // unpublish content
@@ -160,7 +173,7 @@
 
       drupal_set_message(t('%name has been blocked, all submitted content from that user has been unpublished.', array('%name' => check_plain($account->name))));
       break;
-    case 'user_delete_reassign':
+    case 3:
       // Set redirect
       $redirect = variable_get('user_delete_redirect', 'node');
 
@@ -169,7 +182,7 @@
 
       drupal_set_message(t('User record deleted. All submitted content from %name has been reassigned to %anonymous.', array('%name' => check_plain($account->name), '%anonymous' => variable_get('anonymous', t('Anonymous')))));
       break;
-    case 'user_delete_delete':
+    case 4:
       // TODO: Deleting/Backing-up nodes and comments should be done with
       // http://drupal.org/project/batchapi
 
@@ -251,7 +264,7 @@
     user_delete_file_check_directory($dest, TRUE);
     $dest = $dest . '/comment-' . $object->cid . '.txt';
   }
-  else if (is_numeric($object->nid)) {
+  elseif (is_numeric($object->nid)) {
     $dest = $backup_dir . '/nodes';
     user_delete_file_check_directory($dest, TRUE);
     $dest = $dest . '/node-' . $object->nid . '.txt';
@@ -332,8 +345,10 @@
   if (function_exists('search_wipe')) {
     search_wipe($node->nid, 'node');
   }
-  //drupal_set_message(t('%title has been deleted.', array('%title' => $node->title)));
-  watchdog('content', t('@type: deleted %title.', array('@type' => t($node->type), '%title' => $node->title)));
+  $t_string = '@type: deleted %title.';
+  $t_args = array('@type' => t($node->type), '%title' => $node->title);
+  //drupal_set_message(t($t_string, $t_args));
+  watchdog('content', $t_string, $t_args);
 }
 
 /**
