Index: modules/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user.module,v
retrieving revision 1.620
diff -u -F^f -r1.620 user.module
--- modules/user.module	7 May 2006 03:52:34 -0000	1.620
+++ modules/user.module	12 May 2006 17:19:24 -0000
@@ -513,16 +513,32 @@ function user_block($op = 'list', $delta
 
      return $blocks;
   }
-  else if ($op == 'configure' && $delta == 3) {
-    $period = drupal_map_assoc(array(30, 60, 120, 180, 300, 600, 900, 1800, 2700, 3600, 5400, 7200, 10800, 21600, 43200, 86400), 'format_interval');
-    $form['user_block_seconds_online'] = array('#type' => 'select', '#title' => t('User activity'), '#default_value' => variable_get('user_block_seconds_online', 900), '#options' => $period, '#description' => t('A user is considered online for this long after they have last viewed a page.'));
-    $form['user_block_max_list_count'] = array('#type' => 'select', '#title' => t('User list length'), '#default_value' => variable_get('user_block_max_list_count', 10), '#options' => drupal_map_assoc(array(0, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100)), '#description' => t('Maximum number of currently online users to display.'));
-
+  else if ($op == 'configure') {
+    switch ($delta) {
+      case 2:
+        $form["user_block_new_user_list_count"] = array('#type' => 'select', '#title' => t('User list length'), '#default_value' => variable_get('user_block_new_user_list_count', 5), '#options' => drupal_map_assoc(array(0, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100)), '#description' => t('Maximum number of new users to display.'));
+        break;
+        
+      case 3:  
+        $period = drupal_map_assoc(array(30, 60, 120, 180, 300, 600, 900, 1800, 2700, 3600, 5400, 7200, 10800, 21600, 43200, 86400), 'format_interval');
+        $form['user_block_seconds_online'] = array('#type' => 'select', '#title' => t('User activity'), '#default_value' => variable_get('user_block_seconds_online', 900), '#options' => $period, '#description' => t('A user is considered online for this long after they have last viewed a page.'));
+        $form['user_block_online_user_count'] = array('#type' => 'select', '#title' => t('User list length'), '#default_value' => variable_get('user_block_online_user_count', 10), '#options' => drupal_map_assoc(array(0, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100)), '#description' => t('Maximum number of currently online users to display.'));
+        break;
+    }
+    
     return $form;
   }
-  else if ($op == 'save' && $delta == 3) {
-    variable_set('user_block_seconds_online', $edit['user_block_seconds_online']);
-    variable_set('user_block_max_list_count', $edit['user_block_max_list_count']);
+  else if ($op == 'save') {
+    switch ($delta) {
+      case 2:
+        variable_set('user_block_new_user_count', $edit['user_block_new_user_count']);
+        break;
+        
+      case 3: 
+        variable_set('user_block_seconds_online', $edit['user_block_seconds_online']);
+        variable_set('user_block_online_user_count', $edit['user_block_online_user_count']);
+        break;   
+    }
   }
   else if ($op == 'view') {
     $block = array();
@@ -569,7 +585,7 @@ function user_block($op = 'list', $delta
       case 2:
         if (user_access('access content')) {
           // Retrieve a list of new users who have subsequently accessed the site successfully.
-          $result = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 AND access != 0 ORDER BY created DESC', 0, 5);
+          $result = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 AND access != 0 ORDER BY created DESC', 0, variable_get('user_block_new_user_count', 5));
           while ($account = db_fetch_object($result)) {
             $items[] = $account;
           }
@@ -599,7 +615,7 @@ function user_block($op = 'list', $delta
           }
 
           // Display a list of currently online users.
-          $max_users = variable_get('user_block_max_list_count', 10);
+          $max_users = variable_get('user_block_online_user_count', 10);
           if ($total_users && $max_users) {
             $items = array();
 
