--- user.module
+++ user.module
@@ -42,13 +42,31 @@
  *   An associative array of attributes to search for in selecting the
  *   user, such as user name or e-mail address.
  *
+ * @param $reset
+ *   Boolean value indicating if the static cache should be reset.
+ * 
  * @return
  *   A fully-loaded $user object upon successful user load or FALSE if user cannot be loaded.
  */
-function user_load($array = array()) {
+function user_load($array = array(), $reset = FALSE) {
+  static $users = array();
+  if ($reset) {
+    $users = array();
+  }
+  
   // Dynamically compose a SQL query:
   $query = array();
   $params = array();
+  
+  // Check the static cache for the users object.
+  if (is_numeric($array) && $users[$array]) {
+    return $users[$array];
+  }
+  else if (is_array($array) && count($array) == 1 && is_numeric($array['uid']) && $users[$array['uid']]) {
+    return $users[$array['uid']];
+  }
+  
+  // Allow for a single numerical ID to be given.
+  if (is_numeric($array)) {
+    $array = array('uid' => $array);
+  }
 
   foreach ($array as $key => $value) {
     if ($key == 'uid' || $key == 'status') {
@@ -64,10 +82,16 @@
       $params[] = $value;
     }
   }
-  $result = db_query('SELECT * FROM {users} u WHERE '. implode(' AND ', $query), $params);
+  $result = db_query('SELECT * FROM {users} u WHERE '. implode(' AND ', $query), $params);  
 
   if (db_num_rows($result)) {
-    $user = db_fetch_object($result);
+    $user = db_fetch_object($result);    
+    
+    // Check if the rest of the user object has already been cached.
+    if ($users[$user->uid]) {
+      return $users[$user->uid];
+    }
+    
     $user = drupal_unpack($user);
 
     $user->roles = array();
@@ -87,6 +111,9 @@
     $user = FALSE;
   }
 
+  // Cache the user object for later use.
+  $users[$user->uid] = $user;
+  
   return $user;
 }
 
