Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.51
diff -u -p -r1.51 comment.admin.inc
--- modules/comment/comment.admin.inc	20 Oct 2010 01:31:06 -0000	1.51
+++ modules/comment/comment.admin.inc	19 Nov 2010 00:06:18 -0000
@@ -107,7 +107,7 @@ function comment_admin_overview($form, &
           '#options' => array('attributes' => array('title' => truncate_utf8($comment->comment_body[LANGUAGE_NONE][0]['value'], 128)), 'fragment' => 'comment-' . $comment->cid),
         ),
       ),
-      'author' => theme('username', array('account' => $comment)),
+      'author' => theme('username', array('account' => user_load($comment->uid))),
       'posted_in' => array(
         'data' => array(
           '#type' => 'link',
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.917
diff -u -p -r1.917 comment.module
--- modules/comment/comment.module	15 Nov 2010 00:49:46 -0000	1.917
+++ modules/comment/comment.module	19 Nov 2010 00:06:19 -0000
@@ -1905,7 +1905,7 @@ function comment_form($form, &$form_stat
     $form['author']['_author'] = array(
       '#type' => 'item',
       '#title' => t('Your name'),
-      '#markup' => theme('username', array('account' => $user)),
+      '#markup' => theme('username', array('account' => user_load($user->uid))),
     );
     $form['author']['name'] = array(
       '#type' => 'value',
@@ -2227,7 +2227,7 @@ function template_preprocess_comment(&$v
   $node = $variables['elements']['#node'];
   $variables['comment']   = $comment;
   $variables['node']      = $node;
-  $variables['author']    = theme('username', array('account' => $comment));
+  $variables['author']    = theme('username', array('account' => user_load($comment->uid)));
   $variables['created']   = format_date($comment->created);
   $variables['changed']   = format_date($comment->changed);
 
Index: modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.41
diff -u -p -r1.41 dblog.admin.inc
--- modules/dblog/dblog.admin.inc	16 Nov 2010 18:50:12 -0000	1.41
+++ modules/dblog/dblog.admin.inc	19 Nov 2010 00:06:19 -0000
@@ -40,9 +40,7 @@ function dblog_overview() {
 
   $query = db_select('watchdog', 'w')->extend('PagerDefault')->extend('TableSort');
   $query->leftJoin('users', 'u', 'w.uid = u.uid');
-  $query
-    ->fields('w', array('wid', 'uid', 'severity', 'type', 'timestamp', 'message', 'variables', 'link'))
-    ->addField('u', 'name');
+  $query->fields('w', array('wid', 'uid', 'severity', 'type', 'timestamp', 'message', 'variables', 'link'));
   if (!empty($filter['where'])) {
     $query->where($filter['where'], $filter['args']);
   }
@@ -59,7 +57,7 @@ function dblog_overview() {
         t($dblog->type),
         format_date($dblog->timestamp, 'short'),
         theme('dblog_message', array('event' => $dblog, 'link' => TRUE)),
-        theme('username', array('account' => $dblog)),
+        theme('username', array('account' => user_load($dblog->uid))),
         $dblog->link,
       ),
       // Attributes for tr
@@ -130,7 +128,7 @@ function dblog_top($type) {
  */
 function dblog_event($id) {
   $severity = watchdog_severity_levels();
-  $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = :id', array(':id' => $id))->fetchObject();
+  $result = db_query('SELECT w.*, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = :id', array(':id' => $id))->fetchObject();
   if ($dblog = $result) {
     $rows = array(
       array(
@@ -143,7 +141,7 @@ function dblog_event($id) {
       ),
       array(
         array('data' => t('User'), 'header' => TRUE),
-        theme('username', array('account' => $dblog)),
+        theme('username', array('account' => user_load($dblog->uid))),
       ),
       array(
         array('data' => t('Location'), 'header' => TRUE),
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.580
diff -u -p -r1.580 forum.module
--- modules/forum/forum.module	6 Nov 2010 23:24:33 -0000	1.580
+++ modules/forum/forum.module	19 Nov 2010 00:06:19 -0000
@@ -1165,7 +1165,7 @@ function template_preprocess_forum_icon(
  * @see theme_forum_submitted()
  */
 function template_preprocess_forum_submitted(&$variables) {
-  $variables['author'] = isset($variables['topic']->uid) ? theme('username', array('account' => $variables['topic'])) : '';
+  $variables['author'] = isset($variables['topic']->uid) ? theme('username', array('account' => user_load($variables['topic']->uid))) : '';
   $variables['time'] = isset($variables['topic']->created) ? format_interval(REQUEST_TIME - $variables['topic']->created) : '';
 }
 
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.101
diff -u -p -r1.101 node.admin.inc
--- modules/node/node.admin.inc	20 Oct 2010 01:31:07 -0000	1.101
+++ modules/node/node.admin.inc	19 Nov 2010 00:06:20 -0000
@@ -446,7 +446,7 @@ function node_admin_nodes() {
         ),
       ),
       'type' => check_plain(node_type_get_name($node)),
-      'author' => theme('username', array('account' => $node)),
+      'author' => theme('username', array('account' => user_load($node->uid))),
       'status' => $node->status ? t('published') : t('not published'),
       'changed' => format_date($node->changed, 'short'),
     );
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1319
diff -u -p -r1.1319 node.module
--- modules/node/node.module	14 Nov 2010 21:04:45 -0000	1.1319
+++ modules/node/node.module	19 Nov 2010 00:06:20 -0000
@@ -1414,7 +1414,7 @@ function template_preprocess_node(&$vari
   $node = $variables['node'];
 
   $variables['date']      = format_date($node->created);
-  $variables['name']      = theme('username', array('account' => $node));
+  $variables['name']      = theme('username', array('account' => user_load($node->uid)));
 
   $uri = entity_uri('node', $node);
   $variables['node_url']  = url($uri['path'], $uri['options']);
@@ -1648,7 +1648,7 @@ function node_search_execute($keys = NUL
       'link' => url($uri['path'], array_merge($uri['options'], array('absolute' => TRUE))),
       'type' => check_plain(node_type_get_name($node)),
       'title' => $node->title,
-      'user' => theme('username', array('account' => $node)),
+      'user' => theme('username', array('account' => user_load($node->uid))),
       'date' => $node->changed,
       'node' => $node,
       'extra' => $extra,
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.134
diff -u -p -r1.134 node.pages.inc
--- modules/node/node.pages.inc	5 Nov 2010 19:47:20 -0000	1.134
+++ modules/node/node.pages.inc	19 Nov 2010 00:06:21 -0000
@@ -527,13 +527,13 @@ function node_revision_overview($node) {
     $operations = array();
 
     if ($revision->current_vid > 0) {
-      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid"), '!username' => theme('username', array('account' => $revision))))
+      $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid"), '!username' => theme('username', array('account' => user_load($revision->uid)))))
                                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : ''),
                      'class' => array('revision-current'));
       $operations[] = array('data' => drupal_placeholder(t('current revision')), 'class' => array('revision-current'), 'colspan' => 2);
     }
     else {
-      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => $revision))))
+      $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'short'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', array('account' => user_load($revision->uid)))))
                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : '');
       if ($revert_permission) {
         $operations[] = l(t('revert'), "node/$node->nid/revisions/$revision->vid/revert");
Index: modules/poll/poll.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.pages.inc,v
retrieving revision 1.28
diff -u -p -r1.28 poll.pages.inc
--- modules/poll/poll.pages.inc	6 Oct 2010 13:38:40 -0000	1.28
+++ modules/poll/poll.pages.inc	19 Nov 2010 00:06:21 -0000
@@ -64,7 +64,6 @@ function poll_votes($node) {
     ->addTag('translatable')
     ->fields('pv', array('chid', 'uid', 'hostname', 'timestamp', 'nid'))
     ->fields('pc', array('chtext'))
-    ->fields('u', array('name'))
     ->condition('pv.nid', $node->nid)
     ->limit($votes_per_page)
     ->orderByHeader($header)
@@ -73,7 +72,7 @@ function poll_votes($node) {
   $rows = array();
   foreach ($queried_votes as $vote) {
     $rows[] = array(
-      $vote->name ? theme('username', array('account' => $vote)) : check_plain($vote->hostname),
+      $vote->name ? theme('username', array('account' => user_load($vote->uid))) : check_plain($vote->hostname),
       check_plain($vote->chtext),
       format_date($vote->timestamp),
     );
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.294
diff -u -p -r1.294 profile.module
--- modules/profile/profile.module	1 Oct 2010 15:24:18 -0000	1.294
+++ modules/profile/profile.module	19 Nov 2010 00:06:21 -0000
@@ -563,7 +563,6 @@ function template_preprocess_profile_blo
  * @see profile-listing.tpl.php
  */
 function template_preprocess_profile_listing(&$variables) {
-
   $variables['user_picture'] = theme('user_picture', array('account' => $variables['account']));
   $variables['name'] = theme('username', array('account' => $variables['account']));
   $variables['profile'] = array();
Index: modules/search/search.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.api.php,v
retrieving revision 1.31
diff -u -p -r1.31 search.api.php
--- modules/search/search.api.php	18 Nov 2010 05:38:39 -0000	1.31
+++ modules/search/search.api.php	19 Nov 2010 00:06:21 -0000
@@ -236,7 +236,7 @@ function hook_search_execute($keys = NUL
       'link' => url('node/' . $item->sid, array('absolute' => TRUE)),
       'type' => check_plain(node_type_get_name($node)),
       'title' => $node->title,
-      'user' => theme('username', array('account' => $node)),
+      'user' => theme('username', array('account' => user_load($node->uid))),
       'date' => $node->changed,
       'node' => $node,
       'extra' => $extra,
Index: modules/statistics/statistics.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v
retrieving revision 1.40
diff -u -p -r1.40 statistics.admin.inc
--- modules/statistics/statistics.admin.inc	26 Jun 2010 21:32:20 -0000	1.40
+++ modules/statistics/statistics.admin.inc	19 Nov 2010 00:06:21 -0000
@@ -21,7 +21,6 @@ function statistics_recent_hits() {
   $query->join('users', 'u', 'a.uid = u.uid');
   $query
     ->fields('a', array('aid', 'timestamp', 'path', 'title', 'uid'))
-    ->fields('u', array('name'))
     ->limit(30)
     ->orderByHeader($header);
 
@@ -31,7 +30,7 @@ function statistics_recent_hits() {
     $rows[] = array(
       array('data' => format_date($log->timestamp, 'short'), 'class' => array('nowrap')),
       _statistics_format_item($log->title, $log->path),
-      theme('username', array('account' => $log)),
+      theme('username', array('account' => user_load($log->uid))),
       l(t('details'), "admin/reports/access/$log->aid"));
   }
 
@@ -129,7 +128,7 @@ function statistics_top_visitors() {
   $destination = drupal_get_destination();
   foreach ($result as $account) {
     $ban_link = $account->iid ? l(t('unblock IP address'), "admin/config/people/ip-blocking/delete/$account->iid", array('query' => $destination)) : l(t('block IP address'), "admin/config/people/ip-blocking/$account->hostname", array('query' => $destination));
-    $rows[] = array($account->hits, ($account->uid ? theme('username', array('account' => $account)) : $account->hostname), format_interval(round($account->total / 1000)), (user_access('block IP addresses') && !$account->uid) ? $ban_link : '');
+    $rows[] = array($account->hits, ($account->uid ? theme('username', array('account' => user_load($account->uid))) : $account->hostname), format_interval(round($account->total / 1000)), (user_access('block IP addresses') && !$account->uid) ? $ban_link : '');
   }
 
   drupal_set_title(t('Top visitors in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))), PASS_THROUGH);
@@ -193,7 +192,7 @@ function statistics_top_referrers() {
  * Menu callback; Displays recent page accesses.
  */
 function statistics_access_log($aid) {
-  $access = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE aid = :aid', array(':aid' => $aid))->fetch();
+  $access = db_query('SELECT a.* FROM {accesslog} a WHERE aid = :aid', array(':aid' => $aid))->fetch();
   if ($access) {
     $rows[] = array(
       array('data' => t('URL'), 'header' => TRUE),
@@ -215,7 +214,7 @@ function statistics_access_log($aid) {
     );
     $rows[] = array(
       array('data' => t('User'), 'header' => TRUE),
-      theme('username', array('account' => $access))
+      theme('username', array('account' => user_load($access->uid)))
     );
     $rows[] = array(
       array('data' => t('Hostname'), 'header' => TRUE),
Index: modules/statistics/statistics.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v
retrieving revision 1.23
diff -u -p -r1.23 statistics.pages.inc
--- modules/statistics/statistics.pages.inc	9 Jan 2010 21:54:01 -0000	1.23
+++ modules/statistics/statistics.pages.inc	19 Nov 2010 00:06:21 -0000
@@ -20,7 +20,6 @@ function statistics_node_tracker() {
 
     $query
       ->fields('a', array('aid', 'timestamp', 'url', 'uid'))
-      ->fields('u', array('name'))
       ->condition(db_or()
         ->condition('a.path', 'node/' . $node->nid)
         ->condition('a.path', 'node/' . $node->nid . '/%', 'LIKE'))
@@ -33,7 +32,7 @@ function statistics_node_tracker() {
       $rows[] = array(
         array('data' => format_date($log->timestamp, 'short'), 'class' => array('nowrap')),
         _statistics_link($log->url),
-        theme('username', array('account' => $log)),
+        theme('username', array('account' => user_load($log->uid))),
         l(t('details'), "admin/reports/access/$log->aid"),
       );
     }
Index: modules/tracker/tracker.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.pages.inc,v
retrieving revision 1.32
diff -u -p -r1.32 tracker.pages.inc
--- modules/tracker/tracker.pages.inc	30 Jul 2010 02:47:28 -0000	1.32
+++ modules/tracker/tracker.pages.inc	19 Nov 2010 00:06:22 -0000
@@ -62,7 +62,7 @@ function tracker_page($account = NULL, $
       $row = array(
         'type' => check_plain(node_type_get_name($node->type)),
         'title' => array('data' => l($node->title, 'node/' . $node->nid) . ' ' . theme('mark', array('type' => node_mark($node->nid, $node->changed)))),
-        'author' => array('data' => theme('username', array('account' => $node))),
+        'author' => array('data' => theme('username', array('account' => user_load($node->uid)))),
         'replies' => array('class' => array('replies'), 'data' => $comments),
         'last updated' => array('data' => t('!time ago', array('!time' => format_interval(REQUEST_TIME - $node->last_activity)))),
       );

