--- userpoints.module.orig	2007-07-02 09:50:04.000000000 -0700
+++ userpoints.module	2007-09-19 10:44:42.000000000 -0700
@@ -225,7 +225,7 @@ function userpoints_get_current_points($
  * @param description: optional description 
  * @param reference: optional reference information, indexed
  *
- * @return FALSE when no action is take, TRUE when points are credited or debited
+ * @return FALSE when no action is taken, TRUE when points are credited or debited
  */
 function userpoints_userpointsapi($op, $points = 0, $uid = 0, $event = NULL, $description = NULL, $reference = NULL) {
   // anonymous users do not get points, and there have to be points to process
@@ -615,8 +615,8 @@ function userpoints_admin_txn_submit($fo
 
 function userpoints_list_users() {
   $sql = "SELECT p.uid, u.name, p.points
-    FROM {userpoints} p INNER JOIN {users} u USING (uid)";
-  $sql_cnt = "SELECT COUNT(DISTINCT(uid)) FROM {userpoints}";
+    FROM {userpoints} p INNER JOIN {users} u USING (uid) WHERE p.points > 0";
+  $sql_cnt = "SELECT COUNT(DISTINCT(uid)) FROM {userpoints} WHERE points > 0";
   $header = array(
     array('data' => t('User'), 'field' => 'u.name'),
     array('data' => t('!Points', userpoints_translation()), 'field' => 'p.points', 'sort' => 'desc'),
@@ -625,7 +625,7 @@ function userpoints_list_users() {
   $result = pager_query($sql, 30, 0, $sql_cnt);
   while ($data = db_fetch_object($result)) {
     $rows[] = array(
-      array('data' => theme('username', $data)),
+	  array('data' => theme('username', $data)),
       array('data' => $data->points, 'align' => 'right'),
     );
   }
