? drupal-6.x-dev/sites/default/settings.php
Index: drupal-6.x-dev/install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.87
diff -u -p -r1.87 install.php
--- drupal-6.x-dev/install.php	11 Nov 2007 06:56:44 -0000	1.87
+++ drupal-6.x-dev/install.php	11 Nov 2007 18:48:49 -0000
@@ -884,7 +884,14 @@ function install_configure_form() {
   $form['admin_account']['account']['name'] = array('#type' => 'textfield',
     '#title' => st('Username'),
     '#maxlength' => USERNAME_MAX_LENGTH,
-    '#description' => st('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'),
+    '#description' => st('Only lower cases are allowed; spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'),
+    '#required' => TRUE,
+    '#weight' => -15,
+  );
+  $form['admin_account']['account']['fullname'] = array('#type' => 'textfield',
+    '#title' => st('Full name'),
+    '#maxlength' => FULLNAME_MAX_LENGTH,
+    '#description' => st('Specify your first and last name.'),
     '#required' => TRUE,
     '#weight' => -10,
   );
@@ -969,6 +976,9 @@ function install_configure_form_validate
   if ($error = user_validate_name($form_state['values']['account']['name'])) {
     form_error($form['admin_account']['account']['name'], $error);
   }
+  if ($error = user_validate_fullname($form_state['values']['account']['fullname'])) {
+    form_error($form['admin_account']['account']['fullname'], $error);
+  }
   if ($error = user_validate_mail($form_state['values']['account']['mail'])) {
     form_error($form['admin_account']['account']['mail'], $error);
   }
Index: drupal-6.x-dev/includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.710
diff -u -p -r1.710 common.inc
--- drupal-6.x-dev/includes/common.inc	4 Nov 2007 21:24:09 -0000	1.710
+++ drupal-6.x-dev/includes/common.inc	11 Nov 2007 18:48:55 -0000
@@ -2810,6 +2810,9 @@ function drupal_common_themes() {
     'username' => array(
       'arguments' => array('object' => NULL),
     ),
+    'fullname' => array(
+      'arguments' => array('object' => NULL),
+    ),
     'progress_bar' => array(
       'arguments' => array('percent' => NULL, 'message' => NULL),
     ),
Index: drupal-6.x-dev/includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.393
diff -u -p -r1.393 theme.inc
--- drupal-6.x-dev/includes/theme.inc	4 Nov 2007 20:32:34 -0000	1.393
+++ drupal-6.x-dev/includes/theme.inc	11 Nov 2007 18:48:57 -0000
@@ -1660,6 +1660,54 @@ function theme_username($object) {
   return $output;
 }
 
+/**
+ * Format a user full name.
+ *
+ * @param $object
+ *   The user object to format, usually returned from user_load().
+ * @return
+ *   A string containing an HTML link to the user's page if the passed object
+ *   suggests that this is a site user. Otherwise, only the user full name is returned.
+ */
+function theme_fullname($object) {
+
+  if ($object->uid && $object->fullname) {
+    // Shorten the name when it is too long or it will break many tables.
+    if (drupal_strlen($object->fullname) > 20) {
+      $fullname = drupal_substr($object->fullname, 0, 15) .'...';
+    }
+    else {
+      $fullname = $object->fullname;
+    }
+
+    if (user_access('access user profiles')) {
+      $output = l($fullname, 'user/'. $object->uid, array('title' => t('View user profile.')));
+    }
+    else {
+      $output = check_plain($fullname);
+    }
+  }
+  else if ($object->fullname) {
+    // Sometimes modules display content composed by people who are
+    // not registered members of the site (e.g. mailing list or news
+    // aggregator modules). This clause enables modules to display
+    // the true author of the content.
+    if (!empty($object->homepage)) {
+      $output = l($object->fullname, $object->homepage, array('rel' => 'nofollow'));
+    }
+    else {
+      $output = check_plain($object->fullname);
+    }
+
+    $output .= ' ('. t('not verified') .')';
+  }
+  else {
+    $output = variable_get('anonymous', t('Anonymous'));
+  }
+
+  return $output;
+}
+
 function theme_progress_bar($percent, $message) {
   $output = '<div id="progress" class="progress">';
   $output .= '<div class="bar"><div class="filled" style="width: '. $percent .'%"></div></div>';
Index: drupal-6.x-dev/modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.291
diff -u -p -r1.291 blog.module
--- drupal-6.x-dev/modules/blog/blog.module	4 Nov 2007 15:45:15 -0000	1.291
+++ drupal-6.x-dev/modules/blog/blog.module	11 Nov 2007 18:48:58 -0000
@@ -107,7 +107,7 @@ function blog_form(&$node) {
 function blog_view($node, $teaser = FALSE, $page = FALSE) {
   if ($page) {
     // Breadcrumb navigation
-    drupal_set_breadcrumb(array(l(t('Home'), NULL), l(t('Blogs'), 'blog'), l(t("@name's blog", array('@name' => $node->name)), 'blog/'. $node->uid)));
+    drupal_set_breadcrumb(array(l(t('Home'), NULL), l(t('Blogs'), 'blog'), l(t("@fullname's blog", array('@fullname' => $node->fullname)), 'blog/'. $node->uid)));
   }
   return node_prepare($node, $teaser);
 }
@@ -121,9 +121,9 @@ function blog_link($type, $node = NULL, 
   if ($type == 'node' && $node->type == 'blog') {
     if (arg(0) != 'blog' || arg(1) != $node->uid) {
       $links['blog_usernames_blog'] = array(
-        'title' => t("@username's blog", array('@username' => $node->name)),
+        'title' => t("@fullname's blog", array('@fullname' => $node->fullname)),
         'href' => "blog/$node->uid",
-        'attributes' => array('title' => t("Read @username's latest blog entries.", array('@username' => $node->name)))
+        'attributes' => array('title' => t("Read @fullname's latest blog entries.", array('@fullname' => $node->fullname)))
       );
     }
   }
Index: drupal-6.x-dev/modules/blog/blog.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.pages.inc,v
retrieving revision 1.3
diff -u -p -r1.3 blog.pages.inc
--- drupal-6.x-dev/modules/blog/blog.pages.inc	25 Oct 2007 17:44:38 -0000	1.3
+++ drupal-6.x-dev/modules/blog/blog.pages.inc	11 Nov 2007 18:48:58 -0000
@@ -12,7 +12,7 @@
 function blog_page_user($account) {
   global $user;
 
-  drupal_set_title($title = t("@name's blog", array('@name' => $account->name)));
+  drupal_set_title($title = t("@fullname's blog", array('@fullname' => $account->fullname)));
 
   $items = array();
 
@@ -59,7 +59,7 @@ function blog_page_last() {
  */
 function blog_feed_user($account) {
   $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n  WHERE n.type = 'blog' AND n.uid = %d AND n.status = 1 ORDER BY n.created DESC"), $account->uid, 0, variable_get('feed_default_items', 10));
-  $channel['title'] = $account->name ."'s blog";
+  $channel['title'] = $account->fullname ."'s blog";
   $channel['link'] = url('blog/'. $account->uid, array('absolute' => TRUE));
 
   $items = array();
Index: drupal-6.x-dev/modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.1
diff -u -p -r1.1 comment.admin.inc
--- drupal-6.x-dev/modules/comment/comment.admin.inc	31 Oct 2007 17:50:47 -0000	1.1
+++ drupal-6.x-dev/modules/comment/comment.admin.inc	11 Nov 2007 18:48:58 -0000
@@ -46,20 +46,22 @@ function comment_admin_overview($type = 
   $form['header'] = array('#type' => 'value', '#value' => array(
     theme('table_select_header_cell'),
     array('data' => t('Subject'), 'field' => 'subject'),
-    array('data' => t('Author'), 'field' => 'name'),
+    array('data' => t('Author'), 'field' => 'fullname'),
     array('data' => t('Posted in'), 'field' => 'node_title'),
     array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),
     array('data' => t('Operations'))
   ));
-  $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid, n.title as node_title FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid INNER JOIN {node} n ON n.nid = c.nid WHERE c.status = %d'. tablesort_sql($form['header']['#value']), 50, 0, NULL, $status);
+  $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.fullname AS registered_fullname, u.uid, n.title as node_title FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid INNER JOIN {node} n ON n.nid = c.nid WHERE c.status = %d'. tablesort_sql($form['header']['#value']), 50, 0, NULL, $status);
 
   // build a table listing the appropriate comments
   $destination = drupal_get_destination();
   while ($comment = db_fetch_object($result)) {
     $comments[$comment->cid] = '';
     $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
+    $comment->fullname = $comment->uid ? $comment->registered_fullname : $comment->name;
     $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128), 'fragment' => 'comment-'. $comment->cid)));
     $form['username'][$comment->cid] = array('#value' => theme('username', $comment));
+    $form['fullname'][$comment->cid] = array('#value' => theme('fullname', $comment));
     $form['node_title'][$comment->cid] = array('#value' => l($comment->node_title, 'node/'. $comment->nid));
     $form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small'));
     $form['operations'][$comment->cid] = array('#value' => l(t('edit'), 'comment/edit/'. $comment->cid, array('query' => $destination)));
@@ -119,7 +121,7 @@ function theme_comment_admin_overview($f
       $row = array();
       $row[] = drupal_render($form['comments'][$key]);
       $row[] = drupal_render($form['subject'][$key]);
-      $row[] = drupal_render($form['username'][$key]);
+      $row[] = drupal_render($form['fullname'][$key]);
       $row[] = drupal_render($form['node_title'][$key]);
       $row[] = drupal_render($form['timestamp'][$key]);
       $row[] = drupal_render($form['operations'][$key]);
Index: drupal-6.x-dev/modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.601
diff -u -p -r1.601 comment.module
--- drupal-6.x-dev/modules/comment/comment.module	9 Nov 2007 07:46:10 -0000	1.601
+++ drupal-6.x-dev/modules/comment/comment.module	11 Nov 2007 18:49:00 -0000
@@ -897,7 +897,7 @@ function comment_render($node, $cid = 0)
 
     if ($cid && is_numeric($cid)) {
       // Single comment view.
-      $query = 'SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.signature, u.picture, u.data, c.status FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d';
+      $query = 'SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.fullname AS registered_fullname, u.signature, u.picture, u.data, c.status FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d';
       $query_args = array($cid);
       if (!user_access('administer comments')) {
         $query .= ' AND c.status = %d';
@@ -909,6 +909,7 @@ function comment_render($node, $cid = 0)
 
       if ($comment = db_fetch_object($result)) {
         $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
+        $comment->fullname = $comment->uid ? $comment->registered_fullname : $comment->name;
         $links = module_invoke_all('link', 'comment', $comment, 1);
         drupal_alter('link', $links, $node);
 
@@ -918,7 +919,7 @@ function comment_render($node, $cid = 0)
     else {
       // Multiple comment view
       $query_count = 'SELECT COUNT(*) FROM {comments} WHERE nid = %d';
-      $query = 'SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.signature, u.picture, u.data, c.thread, c.status FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.nid = %d';
+      $query = 'SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.fullname AS registered_fullname, u.signature, u.picture, u.data, c.thread, c.status FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.nid = %d';
 
       $query_args = array($nid);
       if (!user_access('administer comments')) {
@@ -963,6 +964,7 @@ function comment_render($node, $cid = 0)
       while ($comment = db_fetch_object($result)) {
         $comment = drupal_unpack($comment);
         $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
+        $comment->fullname = $comment->uid ? $comment->registered_fullname : $comment->name;
         $comment->depth = count(explode('.', $comment->thread)) - 1;
 
         if ($mode == COMMENT_MODE_THREADED_COLLAPSED || $mode == COMMENT_MODE_THREADED_EXPANDED) {
@@ -1129,7 +1131,7 @@ function comment_validate($edit) {
     $node = node_load($edit['nid']);
     if (variable_get('comment_anonymous_'. $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) > COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
       if ($edit['name']) {
-        $taken = db_result(db_query("SELECT COUNT(uid) FROM {users} WHERE LOWER(name) = '%s'", $edit['name']));
+        $taken = db_result(db_query("SELECT COUNT(uid) FROM {users} WHERE name = LOWER('%s')", $edit['name']));
 
         if ($taken != 0) {
           form_set_error('name', t('The name you used belongs to a registered user.'));
@@ -1262,7 +1264,7 @@ function comment_form(&$form_state, $edi
 
     }
     else {
-      $form['_author'] = array('#type' => 'item', '#title' => t('Your name'), '#value' => theme('username', $user)
+      $form['_author'] = array('#type' => 'item', '#title' => t('Your name'), '#value' => theme('fullname', $user)
       );
       $form['author'] = array('#type' => 'value', '#value' => $user->name);
     }
@@ -1364,6 +1366,7 @@ function comment_form_add_preview($form,
     if (!empty($account)) {
       $comment->uid = $account->uid;
       $comment->name = check_plain($account->name);
+      $comment->fullname = check_plain($account->fullname);      
     }
     elseif (empty($comment->name)) {
       $comment->name = variable_get('anonymous', t('Anonymous'));
@@ -1381,9 +1384,10 @@ function comment_form_add_preview($form,
   $output = '';
 
   if ($edit['pid']) {
-    $comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d', $edit['pid'], COMMENT_PUBLISHED));
+    $comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.fullname AS registered_fullname, u.signature, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d', $edit['pid'], COMMENT_PUBLISHED));
     $comment = drupal_unpack($comment);
     $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
+    $comment->fullname = $comment->uid ? $comment->registered_fullname : $comment->name;
     $output .= theme('comment_view', $comment, $node);
   }
   else {
@@ -1546,7 +1550,7 @@ function comment_controls_submit($form, 
 function template_preprocess_comment(&$variables) {
   $comment = $variables['comment'];
   $node = $variables['node'];
-  $variables['author']    = theme('username', $comment);
+  $variables['author']    = theme('fullname', $comment);
   $variables['content']   = $comment->comment;
   $variables['date']      = format_date($comment->timestamp);
   $variables['links']     = isset($variables['links']) ? theme('links', $variables['links']) : '';
@@ -1569,7 +1573,7 @@ function template_preprocess_comment(&$v
  */
 function template_preprocess_comment_folded(&$variables) {
   $comment = $variables['comment'];
-  $variables['author'] = theme('username', $comment);
+  $variables['author'] = theme('fullname', $comment);
   $variables['date']   = format_date($comment->timestamp);
   $variables['new']    = $comment->new ? t('new') : '';
   $variables['title']  = l($comment->subject, comment_node_url() .'/'. $comment->cid, array('fragment' => "comment-$comment->cid"));
@@ -1636,9 +1640,9 @@ function template_preprocess_comment_wra
  * Make the submitted variable themable
  */
 function theme_comment_submitted($comment) {
-  return t('Submitted by !username on @datetime.',
+  return t('Submitted by !fullname on @datetime.',
     array(
-      '!username' => theme('username', $comment),
+      '!fullname' => theme('fullname', $comment),
       '@datetime' => format_date($comment->timestamp)
     ));
 }
Index: drupal-6.x-dev/modules/comment/comment.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.pages.inc,v
retrieving revision 1.1
diff -u -p -r1.1 comment.pages.inc
--- drupal-6.x-dev/modules/comment/comment.pages.inc	31 Oct 2007 17:50:47 -0000	1.1
+++ drupal-6.x-dev/modules/comment/comment.pages.inc	11 Nov 2007 18:49:00 -0000
@@ -62,7 +62,7 @@ function comment_reply($node, $pid = NUL
       // $pid indicates that this is a reply to a comment.
       if ($pid) {
         // load the comment whose cid = $pid
-        if ($comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d', $pid, COMMENT_PUBLISHED))) {
+        if ($comment = db_fetch_object(db_query('SELECT c.*, u.uid, u.name AS registered_name, u.fullname AS registered_fullname, u.signature, u.picture, u.data FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status = %d', $pid, COMMENT_PUBLISHED))) {
           // If that comment exists, make sure that the current comment and the parent comment both
           // belong to the same parent node.
           if ($comment->nid != $node->nid) {
@@ -73,6 +73,7 @@ function comment_reply($node, $pid = NUL
           // Display the parent comment
           $comment = drupal_unpack($comment);
           $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
+          $comment->fullname = $comment->uid ? $comment->registered_fullname : $comment->name;
           $output .= theme('comment_view', $comment, $node);
         }
         else {
Index: drupal-6.x-dev/modules/contact/contact.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v
retrieving revision 1.4
diff -u -p -r1.4 contact.pages.inc
--- drupal-6.x-dev/modules/contact/contact.pages.inc	2 Oct 2007 16:03:17 -0000	1.4
+++ drupal-6.x-dev/modules/contact/contact.pages.inc	11 Nov 2007 18:49:01 -0000
@@ -37,12 +37,12 @@ function contact_mail_page() {
   }
 
   if (count($categories) > 0) {
-    $form['#token'] = $user->uid ? $user->name . $user->mail : '';
+    $form['#token'] = $user->uid ? $user->fullname . $user->mail : '';
     $form['contact_information'] = array('#value' => filter_xss_admin(variable_get('contact_form_information', t('You can leave a message using the contact form below.'))));
     $form['name'] = array('#type' => 'textfield',
       '#title' => t('Your name'),
       '#maxlength' => 255,
-      '#default_value' => $user->uid ? $user->name : '',
+      '#default_value' => $user->uid ? $user->fullname : '',
       '#required' => TRUE,
     );
     $form['mail'] = array('#type' => 'textfield',
@@ -160,7 +160,7 @@ function contact_user_page($account) {
     $output = t('You cannot contact more than %number users per hour. Please try again later.', array('%number' => variable_get('contact_hourly_threshold', 3)));
   }
   else {
-    drupal_set_title(check_plain($account->name));
+    drupal_set_title(check_plain($account->fullname));
     $output = drupal_get_form('contact_mail_user', $account);
   }
 
@@ -169,15 +169,15 @@ function contact_user_page($account) {
 
 function contact_mail_user(&$form_state, $recipient) {
   global $user;
-  $form['#token'] = $user->name . $user->mail;
+  $form['#token'] = $user->fullname . $user->mail;
   $form['recipient'] = array('#type' => 'value', '#value' => $recipient);
   $form['from'] = array('#type' => 'item',
     '#title' => t('From'),
-    '#value' => check_plain($user->name) .' &lt;'. check_plain($user->mail) .'&gt;',
+    '#value' => check_plain($user->fullname) .' &lt;'. check_plain($user->mail) .'&gt;',
   );
   $form['to'] = array('#type' => 'item',
     '#title' => t('To'),
-    '#value' => check_plain($recipient->name),
+    '#value' => check_plain($recipient->fullname),
   );
   $form['subject'] = array('#type' => 'textfield',
     '#title' => t('Subject'),
Index: drupal-6.x-dev/modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.4
diff -u -p -r1.4 dblog.admin.inc
--- drupal-6.x-dev/modules/dblog/dblog.admin.inc	20 Oct 2007 21:57:49 -0000	1.4
+++ drupal-6.x-dev/modules/dblog/dblog.admin.inc	11 Nov 2007 18:49:01 -0000
@@ -48,11 +48,11 @@ function dblog_overview() {
     array('data' => t('Type'), 'field' => 'w.type'),
     array('data' => t('Date'), 'field' => 'w.wid', 'sort' => 'desc'),
     t('Message'),
-    array('data' => t('User'), 'field' => 'u.name'),
+    array('data' => t('User'), 'field' => 'u.fullname'),
     array('data' => t('Operations')),
   );
 
-  $sql = "SELECT w.wid, w.uid, w.severity, w.type, w.timestamp, w.message, w.variables, w.link, u.name FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid";
+  $sql = "SELECT w.wid, w.uid, w.severity, w.type, w.timestamp, w.message, w.variables, w.link, u.fullname FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid";
   $tablesort = tablesort_sql($header);
   if (!empty($filter['where'])) {
     $result = pager_query($sql ." WHERE ". $filter['where'] . $tablesort, 50, 0, NULL, $filter['args']);
@@ -69,7 +69,7 @@ function dblog_overview() {
         t($dblog->type),
         format_date($dblog->timestamp, 'small'),
         l(truncate_utf8(_dblog_format_message($dblog), 56, TRUE, TRUE), 'admin/reports/event/'. $dblog->wid, array('html' => TRUE)),
-        theme('username', $dblog),
+        theme('fullname', $dblog),
         $dblog->link,
       ),
       // Attributes for tr
@@ -121,7 +121,7 @@ function dblog_top($type) {
 function dblog_event($id) {
   $severity = watchdog_severity_levels();
   $output = '';
-  $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id);
+  $result = db_query('SELECT w.*, u.fullname, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id);
   if ($dblog = db_fetch_object($result)) {
     $rows = array(
       array(
@@ -134,7 +134,7 @@ function dblog_event($id) {
       ),
       array(
         array('data' => t('User'), 'header' => TRUE),
-        theme('username', $dblog),
+        theme('fullname', $dblog),
       ),
       array(
         array('data' => t('Location'), 'header' => TRUE),
Index: drupal-6.x-dev/modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.425
diff -u -p -r1.425 forum.module
--- drupal-6.x-dev/modules/forum/forum.module	25 Oct 2007 15:32:55 -0000	1.425
+++ drupal-6.x-dev/modules/forum/forum.module	11 Nov 2007 18:49:02 -0000
@@ -506,14 +506,14 @@ function forum_get_forums($tid = 0) {
     // This query does not use full ANSI syntax since MySQL 3.x does not support
     // table1 INNER JOIN table2 INNER JOIN table3 ON table2_criteria ON table3_criteria
     // used to join node_comment_statistics to users.
-    $sql = "SELECT ncs.last_comment_timestamp, IF (ncs.last_comment_uid != 0, u2.name, ncs.last_comment_name) AS last_comment_name, ncs.last_comment_uid FROM {node} n INNER JOIN {users} u1 ON n.uid = u1.uid INNER JOIN {term_node} tn ON n.vid = tn.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid INNER JOIN {users} u2 ON ncs.last_comment_uid=u2.uid WHERE n.status = 1 AND tn.tid = %d ORDER BY ncs.last_comment_timestamp DESC";
+    $sql = "SELECT ncs.last_comment_timestamp, IF (ncs.last_comment_uid != 0, u2.fullname, ncs.last_comment_name) AS last_comment_fullname, ncs.last_comment_uid FROM {node} n INNER JOIN {users} u1 ON n.uid = u1.uid INNER JOIN {term_node} tn ON n.vid = tn.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid INNER JOIN {users} u2 ON ncs.last_comment_uid=u2.uid WHERE n.status = 1 AND tn.tid = %d ORDER BY ncs.last_comment_timestamp DESC";
     $sql = db_rewrite_sql($sql);
     $topic = db_fetch_object(db_query_range($sql, $forum->tid, 0, 1));
 
     $last_post = new stdClass();
     if (!empty($topic->last_comment_timestamp)) {
       $last_post->timestamp = $topic->last_comment_timestamp;
-      $last_post->name = $topic->last_comment_name;
+      $last_post->fullname = $topic->last_comment_fullname;
       $last_post->uid = $topic->last_comment_uid;
     }
     $forum->last_post = $last_post;
@@ -554,7 +554,7 @@ function forum_get_topics($tid, $sortby,
 
   $term = taxonomy_get_term($tid);
 
-  $sql = db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.sticky, u.name, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name) AS last_comment_name, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {users} cu ON l.last_comment_uid = cu.uid INNER JOIN {term_node} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d");
+  $sql = db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.sticky, u.name, u.fullname, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.fullname, l.last_comment_name) AS last_comment_fullname, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {users} cu ON l.last_comment_uid = cu.uid INNER JOIN {term_node} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d");
   $sql .= tablesort_sql($forum_topic_list_header, 'n.sticky DESC,');
   $sql .= ', n.created DESC';  // Always add a secondary sort order so that the news forum topics are on top.
 
@@ -583,7 +583,7 @@ function forum_get_topics($tid, $sortby,
     if ($topic->num_comments > 0) {
       $last_reply = new stdClass();
       $last_reply->timestamp = $topic->last_comment_timestamp;
-      $last_reply->name = $topic->last_comment_name;
+      $last_reply->fullname = $topic->last_comment_fullname;
       $last_reply->uid = $topic->last_comment_uid;
       $topic->last_reply = $last_reply;
     }
@@ -894,7 +894,7 @@ function template_preprocess_forum_topic
  * @see theme_forum_submitted
  */
 function template_preprocess_forum_submitted(&$variables) {
-  $variables['author'] = isset($variables['topic']->uid) ? theme('username', $variables['topic']) : '';
+  $variables['author'] = isset($variables['topic']->uid) ? theme('fullname', $variables['topic']) : '';
   $variables['time'] = isset($variables['topic']->timestamp) ? format_interval(time() - $variables['topic']->timestamp) : '';
 }
 
Index: drupal-6.x-dev/modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.8
diff -u -p -r1.8 node.admin.inc
--- drupal-6.x-dev/modules/node/node.admin.inc	24 Oct 2007 14:38:38 -0000	1.8
+++ drupal-6.x-dev/modules/node/node.admin.inc	11 Nov 2007 18:49:03 -0000
@@ -356,7 +356,7 @@ function node_admin_nodes() {
 
   $filter = node_build_filter_query();
 
-  $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n '. $filter['join'] .' INNER JOIN {users} u ON n.uid = u.uid '. $filter['where'] .' ORDER BY n.changed DESC'), 50, 0, NULL, $filter['args']);
+  $result = pager_query(db_rewrite_sql('SELECT n.*, u.name, u.fullname FROM {node} n '. $filter['join'] .' INNER JOIN {users} u ON n.uid = u.uid '. $filter['where'] .' ORDER BY n.changed DESC'), 50, 0, NULL, $filter['args']);
 
   // Enable language column if locale is enabled or if we have any node with language
   $count = db_result(db_query("SELECT COUNT(*) FROM {node} n WHERE language != ''"));
@@ -384,7 +384,7 @@ function node_admin_nodes() {
     $nodes[$node->nid] = '';
     $form['title'][$node->nid] = array('#value' => l($node->title, 'node/'. $node->nid) .' '. theme('mark', node_mark($node->nid, $node->changed)));
     $form['name'][$node->nid] =  array('#value' => node_get_types('name', $node));
-    $form['username'][$node->nid] = array('#value' => theme('username', $node));
+    $form['fullname'][$node->nid] = array('#value' => theme('fullname', $node));
     $form['status'][$node->nid] =  array('#value' =>  ($node->status ? t('published') : t('not published')));
     if ($multilanguage) {
       $form['language'][$node->nid] = array('#value' => empty($node->language) ? t('Language neutral') : module_invoke('locale', 'language_name', $node->language));
@@ -419,7 +419,7 @@ function theme_node_admin_nodes($form) {
       $row[] = drupal_render($form['nodes'][$key]);
       $row[] = drupal_render($form['title'][$key]);
       $row[] = drupal_render($form['name'][$key]);
-      $row[] = drupal_render($form['username'][$key]);
+      $row[] = drupal_render($form['fullname'][$key]);
       $row[] = drupal_render($form['status'][$key]);
       if (isset($form['language'])) {
         $row[] = drupal_render($form['language'][$key]);
Index: drupal-6.x-dev/modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.898
diff -u -p -r1.898 node.module
--- drupal-6.x-dev/modules/node/node.module	5 Nov 2007 15:14:54 -0000	1.898
+++ drupal-6.x-dev/modules/node/node.module	11 Nov 2007 18:49:08 -0000
@@ -652,7 +652,7 @@ function node_load($param = array(), $re
   // Retrieve a field list based on the site's schema.
   $fields = drupal_schema_fields_sql('node', 'n');
   $fields = array_merge($fields, drupal_schema_fields_sql('node_revisions', 'r'));
-  $fields = array_merge($fields, array('u.name', 'u.data'));
+  $fields = array_merge($fields, array('u.name', 'u.fullname', 'u.data'));
   $fields = implode(', ', $fields);
   // rename timestamp field for clarity.
   $fields = str_replace('r.timestamp', 'r.timestamp AS revision_timestamp', $fields);
@@ -2242,9 +2242,9 @@ function node_forms() {
  * Format the "Submitted by username on date/time" for each node
  */
 function theme_node_submitted($node) {
-  return t('Submitted by !username on @datetime',
+  return t('Submitted by !fullname on @datetime',
     array(
-      '!username' => theme('username', $node),
+      '!fullname' => theme('fullname', $node),
       '@datetime' => format_date($node->created),
     ));
 }
Index: drupal-6.x-dev/modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.6
diff -u -p -r1.6 node.pages.inc
--- drupal-6.x-dev/modules/node/node.pages.inc	22 Oct 2007 10:37:14 -0000	1.6
+++ drupal-6.x-dev/modules/node/node.pages.inc	11 Nov 2007 18:49:09 -0000
@@ -321,6 +321,7 @@ function node_preview($node) {
       // user ID 0 denotes the anonymous user.
       if ($user = user_load(array('name' => $node->name))) {
         $node->uid = $user->uid;
+        $node->fullname = $user->fullname;
         $node->picture = $user->picture;
       }
       else {
@@ -330,6 +331,7 @@ function node_preview($node) {
     else if ($node->uid) {
       $user = user_load(array('uid' => $node->uid));
       $node->name = $user->name;
+      $node->fullname = $user->fullname;
       $node->picture = $user->picture;
     }
 
Index: drupal-6.x-dev/modules/openid/openid.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 openid.pages.inc
--- drupal-6.x-dev/modules/openid/openid.pages.inc	8 Nov 2007 13:58:32 -0000	1.2
+++ drupal-6.x-dev/modules/openid/openid.pages.inc	11 Nov 2007 18:49:09 -0000
@@ -28,7 +28,7 @@ function openid_authentication_page() {
  * Menu callback; Manage OpenID identities for the specified user.
  */
 function openid_user_identities($account) {
-  drupal_set_title(check_plain($account->name));
+  drupal_set_title(check_plain($account->fullname));
   drupal_add_css(drupal_get_path('module', 'openid') .'/openid.css', 'module');
 
   // Check to see if we got a response
Index: drupal-6.x-dev/modules/poll/poll.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 poll.pages.inc
--- drupal-6.x-dev/modules/poll/poll.pages.inc	19 Oct 2007 10:19:03 -0000	1.2
+++ drupal-6.x-dev/modules/poll/poll.pages.inc	11 Nov 2007 18:49:09 -0000
@@ -32,14 +32,14 @@ function poll_votes($node) {
   drupal_set_title(check_plain($node->title));
   $output = t('This table lists all the recorded votes for this poll.  If anonymous users are allowed to vote, they will be identified by the IP address of the computer they used when they voted.');
 
-  $header[] = array('data' => t('Visitor'), 'field' => 'u.name');
+  $header[] = array('data' => t('Visitor'), 'field' => 'u.fullname');
   $header[] = array('data' => t('Vote'), 'field' => 'pv.chorder');
 
-  $result = pager_query("SELECT pv.chorder, pv.uid, pv.hostname, u.name FROM {poll_votes} pv LEFT JOIN {users} u ON pv.uid = u.uid WHERE pv.nid = %d". tablesort_sql($header), 20, 0, NULL, $node->nid);
+  $result = pager_query("SELECT pv.chorder, pv.uid, pv.hostname, u.fullname FROM {poll_votes} pv LEFT JOIN {users} u ON pv.uid = u.uid WHERE pv.nid = %d". tablesort_sql($header), 20, 0, NULL, $node->nid);
   $rows = array();
   while ($vote = db_fetch_object($result)) {
     $rows[] = array(
-      $vote->name ? theme('username', $vote) : check_plain($vote->hostname),
+      $vote->fullname ? theme('fullname', $vote) : check_plain($vote->hostname),
       check_plain($node->choice[$vote->chorder]['chtext']));
   }
   $output .= theme('table', $header, $rows);
Index: drupal-6.x-dev/modules/statistics/statistics.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v
retrieving revision 1.2
diff -u -p -r1.2 statistics.admin.inc
--- drupal-6.x-dev/modules/statistics/statistics.admin.inc	20 Oct 2007 21:57:50 -0000	1.2
+++ drupal-6.x-dev/modules/statistics/statistics.admin.inc	11 Nov 2007 18:49:09 -0000
@@ -13,11 +13,11 @@ function statistics_recent_hits() {
   $header = array(
     array('data' => t('Timestamp'), 'field' => 'a.timestamp', 'sort' => 'desc'),
     array('data' => t('Page'), 'field' => 'a.path'),
-    array('data' => t('User'), 'field' => 'u.name'),
+    array('data' => t('User'), 'field' => 'u.fullname'),
     array('data' => t('Operations'))
   );
 
-  $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM {accesslog} a LEFT JOIN {users} u ON u.uid = a.uid'. tablesort_sql($header);
+  $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.fullname, a.timestamp FROM {accesslog} a LEFT JOIN {users} u ON u.uid = a.uid'. tablesort_sql($header);
 
   $result = pager_query($sql, 30);
   $rows = array();
@@ -25,7 +25,7 @@ function statistics_recent_hits() {
     $rows[] = array(
       array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
       _statistics_format_item($log->title, $log->path),
-      theme('username', $log),
+      theme('fullname', $log),
       l(t('details'), "admin/reports/access/$log->aid"));
   }
 
@@ -76,12 +76,12 @@ function statistics_top_visitors() {
 
   $header = array(
     array('data' => t('Hits'), 'field' => 'hits', 'sort' => 'desc'),
-    array('data' => t('Visitor'), 'field' => 'u.name'),
+    array('data' => t('Visitor'), 'field' => 'u.fullname'),
     array('data' => t('Total page generation time'), 'field' => 'total'),
     array('data' => t('Operations'))
   );
 
-  $sql = "SELECT COUNT(a.uid) AS hits, a.uid, u.name, a.hostname, SUM(a.timer) AS total, ac.aid FROM {accesslog} a LEFT JOIN {access} ac ON ac.type = 'host' AND LOWER(a.hostname) LIKE (ac.mask) LEFT JOIN {users} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.name, ac.aid". tablesort_sql($header);
+  $sql = "SELECT COUNT(a.uid) AS hits, a.uid, u.fullname, a.hostname, SUM(a.timer) AS total, ac.aid FROM {accesslog} a LEFT JOIN {access} ac ON ac.type = 'host' AND LOWER(a.hostname) LIKE (ac.mask) LEFT JOIN {users} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.fullname, ac.aid". tablesort_sql($header);
   $sql_cnt = "SELECT COUNT(DISTINCT(CONCAT(uid, hostname))) FROM {accesslog}";
   $result = pager_query($sql, 30, 0, $sql_cnt);
 
@@ -89,7 +89,7 @@ function statistics_top_visitors() {
   while ($account = db_fetch_object($result)) {
     $qs = drupal_get_destination();
     $ban_link = $account->aid ? l(t('unban'), "admin/user/rules/delete/$account->aid", array('query' => $qs)) : l(t('ban'), "admin/user/rules/add/$account->hostname/host", array('query' => $qs));
-    $rows[] = array($account->hits, ($account->uid ? theme('username', $account) : $account->hostname), format_interval(round($account->total / 1000)), $ban_link);
+    $rows[] = array($account->hits, ($account->uid ? theme('fullname', $account) : $account->hostname), format_interval(round($account->total / 1000)), $ban_link);
   }
 
   if (empty($rows)) {
@@ -137,7 +137,7 @@ function statistics_top_referrers() {
  * Menu callback; Displays recent page accesses.
  */
 function statistics_access_log($aid) {
-  $result = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE aid = %d', $aid);
+  $result = db_query('SELECT a.*, u.fullname FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE aid = %d', $aid);
   if ($access = db_fetch_object($result)) {
     $rows[] = array(
       array('data' => t('URL'), 'header' => TRUE),
@@ -159,7 +159,7 @@ function statistics_access_log($aid) {
     );
     $rows[] = array(
       array('data' => t('User'), 'header' => TRUE),
-      theme('username', $access)
+      theme('fullname', $access)
     );
     $rows[] = array(
       array('data' => t('Hostname'), 'header' => TRUE),
Index: drupal-6.x-dev/modules/statistics/statistics.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 statistics.pages.inc
--- drupal-6.x-dev/modules/statistics/statistics.pages.inc	20 Oct 2007 21:57:50 -0000	1.2
+++ drupal-6.x-dev/modules/statistics/statistics.pages.inc	11 Nov 2007 18:49:09 -0000
@@ -12,16 +12,16 @@ function statistics_node_tracker() {
     $header = array(
         array('data' => t('Time'), 'field' => 'a.timestamp', 'sort' => 'desc'),
         array('data' => t('Referrer'), 'field' => 'a.url'),
-        array('data' => t('User'), 'field' => 'u.name'),
+        array('data' => t('User'), 'field' => 'u.fullname'),
         array('data' => t('Operations')));
 
-    $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\''. tablesort_sql($header), 30, 0, NULL, $node->nid);
+    $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.fullname FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\''. tablesort_sql($header), 30, 0, NULL, $node->nid);
     $rows = array();
     while ($log = db_fetch_object($result)) {
       $rows[] = array(
         array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
         _statistics_link($log->url),
-        theme('username', $log),
+        theme('fullname', $log),
         l(t('details'), "admin/reports/access/$log->aid"));
     }
 
Index: drupal-6.x-dev/modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.175
diff -u -p -r1.175 system.install
--- drupal-6.x-dev/modules/system/system.install	11 Nov 2007 08:48:22 -0000	1.175
+++ drupal-6.x-dev/modules/system/system.install	11 Nov 2007 18:49:15 -0000
@@ -268,7 +268,7 @@ function system_install() {
   // presumed to be a serialized array. Install will change uid 1 immediately
   // anyways. So we insert the superuser here, the uid is 2 here for now, but
   // very soon it will be changed to 1.
-  db_query("INSERT INTO {users} (name, mail, created, data) VALUES('%s', '%s', %d, '%s')", 'placeholder-for-uid-1', 'placeholder-for-uid-1', time(), serialize(array()));
+  db_query("INSERT INTO {users} (name, fullname, mail, created, data) VALUES('%s', '%s', '%s', %d, '%s')", 'placeholder-for-uid-1', 'placeholder-for-uid-1', 'placeholder-for-uid-1', time(), serialize(array()));
   // This sets the above two users to 1 -1 = 0 (anonymous) and
   // 2- 1 = 1 (superuser). We skip uid 2 but that's not a big problem.
   db_query('UPDATE {users} SET uid = uid - 1');
Index: drupal-6.x-dev/modules/tracker/tracker.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.pages.inc,v
retrieving revision 1.4
diff -u -p -r1.4 tracker.pages.inc
--- drupal-6.x-dev/modules/tracker/tracker.pages.inc	6 Nov 2007 08:51:23 -0000	1.4
+++ drupal-6.x-dev/modules/tracker/tracker.pages.inc	11 Nov 2007 18:49:17 -0000
@@ -19,17 +19,17 @@ function tracker_page($account = NULL, $
       // When viewed from user/%user/track, display the name of the user
       // as page title -- the tab title remains Track so this needs to be done
       // here and not in the menu definiton.
-      drupal_set_title(check_plain($account->name));
+      drupal_set_title(check_plain($account->fullname));
     }
-  // TODO: These queries are very expensive, see http://drupal.org/node/105639
-    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_updated DESC';
+    // TODO: These queries are very expensive, see http://drupal.org/node/105639
+    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, u.fullname, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_updated DESC';
     $sql = db_rewrite_sql($sql);
     $sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d)';
     $sql_count = db_rewrite_sql($sql_count);
     $result = pager_query($sql, 25, 0, $sql_count, COMMENT_PUBLISHED, $account->uid, $account->uid);
   }
   else {
-    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 ORDER BY last_updated DESC';
+    $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, u.fullname, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 ORDER BY last_updated DESC';
     $sql = db_rewrite_sql($sql);
     $sql_count = 'SELECT COUNT(n.nid) FROM {node} n WHERE n.status = 1';
     $sql_count = db_rewrite_sql($sql_count);
@@ -52,7 +52,7 @@ function tracker_page($account = NULL, $
     $rows[] = array(
       node_get_types('name', $node->type),
       l($node->title, "node/$node->nid") .' '. theme('mark', node_mark($node->nid, $node->changed)),
-      theme('username', $node),
+      theme('fullname', $node),
       array('class' => 'replies', 'data' => $comments),
       t('!time ago', array('!time' => format_interval(time() - $node->last_updated)))
     );
Index: drupal-6.x-dev/modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.9
diff -u -p -r1.9 user.admin.inc
--- drupal-6.x-dev/modules/user/user.admin.inc	10 Nov 2007 10:15:21 -0000	1.9
+++ drupal-6.x-dev/modules/user/user.admin.inc	11 Nov 2007 18:49:18 -0000
@@ -132,6 +132,7 @@ function user_admin_account() {
   $header = array(
     array(),
     array('data' => t('Username'), 'field' => 'u.name'),
+    array('data' => t('Full name'), 'field' => 'u.fullname'),
     array('data' => t('Status'), 'field' => 'u.status'),
     t('Roles'),
     array('data' => t('Member for'), 'field' => 'u.created', 'sort' => 'desc'),
@@ -139,7 +140,7 @@ function user_admin_account() {
     t('Operations')
   );
 
-  $sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where'];
+  $sql = 'SELECT DISTINCT u.uid, u.name, u.fullname, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where'];
   $sql .= tablesort_sql($header);
   $query_count = 'SELECT COUNT(DISTINCT u.uid) FROM users u LEFT JOIN users_roles ur ON u.uid = ur.uid '. $filter['join'] .' WHERE u.uid != 0 '. $filter['where'];
   $result = pager_query($sql, 50, 0, $query_count, $filter['args']);
@@ -172,6 +173,7 @@ function user_admin_account() {
   while ($account = db_fetch_object($result)) {
     $accounts[$account->uid] = '';
     $form['name'][$account->uid] = array('#value' => theme('username', $account));
+    $form['fullname'][$account->uid] = array('#value' => theme('fullname', $account));
     $form['status'][$account->uid] =  array('#value' => $status[$account->status]);
     $users_roles = array();
     $roles_result = db_query('SELECT rid FROM {users_roles} WHERE uid = %d', $account->uid);
@@ -913,6 +915,7 @@ function theme_user_admin_account($form)
   $header = array(
     theme('table_select_header_cell'),
     array('data' => t('Username'), 'field' => 'u.name'),
+    array('data' => t('Full name'), 'field' => 'u.fullname'),
     array('data' => t('Status'), 'field' => 'u.status'),
     t('Roles'),
     array('data' => t('Member for'), 'field' => 'u.created', 'sort' => 'desc'),
@@ -926,6 +929,7 @@ function theme_user_admin_account($form)
       $rows[] = array(
         drupal_render($form['accounts'][$key]),
         drupal_render($form['name'][$key]),
+        drupal_render($form['fullname'][$key]),
         drupal_render($form['status'][$key]),
         drupal_render($form['roles'][$key]),
         drupal_render($form['member_for'][$key]),
Index: drupal-6.x-dev/modules/user/user.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.install,v
retrieving revision 1.3
diff -u -p -r1.3 user.install
--- drupal-6.x-dev/modules/user/user.install	4 Nov 2007 14:33:07 -0000	1.3
+++ drupal-6.x-dev/modules/user/user.install	11 Nov 2007 18:49:19 -0000
@@ -142,6 +142,13 @@ function user_schema() {
         'default' => '',
         'description' => t('Unique user name.'),
       ),
+      'fullname' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => t('User full name.'),
+      ),
       'pass' => array(
         'type' => 'varchar',
         'length' => 32,
@@ -282,3 +289,14 @@ function user_schema() {
   return $schema;
 }
 
+/**
+ * Add a fullname field to users table, folk from name, and convert all stored
+ * name to lower case.
+ */
+function user_update_6000() {
+  $ret = array();
+  db_add_field($ret, 'users', 'fullname', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', 'description' => t('User full name.')));
+  $ret[] = update_sql('UPDATE {users} SET fullname = name');
+  $ret[] = update_sql('UPDATE {users} SET name = LOWER(name)');
+  return $ret;
+}
Index: drupal-6.x-dev/modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.862
diff -u -p -r1.862 user.module
--- drupal-6.x-dev/modules/user/user.module	6 Nov 2007 12:20:14 -0000	1.862
+++ drupal-6.x-dev/modules/user/user.module	11 Nov 2007 18:49:22 -0000
@@ -7,6 +7,7 @@
  */
 
 define('USERNAME_MAX_LENGTH', 60);
+define('FULLNAME_MAX_LENGTH', 255);
 define('EMAIL_MAX_LENGTH', 64);
 
 /**
@@ -144,17 +145,23 @@ function user_load($array = array()) {
   }
 
   foreach ($array as $key => $value) {
-    if ($key == 'uid' || $key == 'status') {
-      $query[] = "$key = %d";
-      $params[] = $value;
-    }
-    else if ($key == 'pass') {
-      $query[] = "pass = '%s'";
-      $params[] = md5($value);
-    }
-    else {
-      $query[]= "LOWER($key) = LOWER('%s')";
-      $params[] = $value;
+    switch ($key) {
+      case 'uid':
+      case 'status':
+        $query[] = "$key = %d";
+        $params[] = $value;
+        break;
+      case 'pass':
+        $query[] = "pass = '%s'";
+        $params[] = md5($value);
+        break;
+      case 'name':
+        $query[]= "$key = LOWER('%s')";
+        $params[] = $value;
+        break;
+      default:
+        $query[]= "LOWER($key) = LOWER('%s')";
+        $params[] = $value;
     }
   }
   $result = db_query('SELECT * FROM {users} u WHERE '. implode(' AND ', $query), $params);
@@ -216,7 +223,12 @@ function user_save($account, $array = ar
       else if ((substr($key, 0, 4) !== 'auth') && ($key != 'pass')) {
         if (in_array($key, $user_fields)) {
           // Save standard fields
-          $query .= "$key = '%s', ";
+          if ($key == 'name') {
+            $query .= "$key = LOWER('%s'), ";
+          }
+          else {
+            $query .= "$key = '%s', ";
+          }
           $v[] = $value;
         }
         else if ($key != 'roles') {
@@ -297,6 +309,11 @@ function user_save($account, $array = ar
           $values[] = $value;
           $s[] = "%d";
           break;
+        case 'name':
+          $fields[] = $key;
+          $values[] = $value;
+          $s[] = "LOWER('%s')";
+          break;
         default:
           if (substr($key, 0, 4) !== 'auth' && in_array($key, $user_fields)) {
             $fields[] = $key;
@@ -376,6 +393,14 @@ function user_validate_name($name) {
   if (strlen($name) > USERNAME_MAX_LENGTH) return t('The username %name is too long: it must be %max characters or less.', array('%name' => $name, '%max' => USERNAME_MAX_LENGTH));
 }
 
+/**
+ * Verify the syntax of the given full name.
+ */
+function user_validate_fullname($fullname) {
+  if (!strlen($fullname)) return t('You must enter a full name.');
+  if (strlen($fullname) > FULLNAME_MAX_LENGTH) return t('The full name %fullname is too long: it must be %max characters or less.', array('%fullname' => $name, '%max' => FULLNAME_MAX_LENGTH));
+}
+
 function user_validate_mail($mail) {
   if (!$mail) return t('You must enter an e-mail address.');
   if (!valid_email_address($mail)) {
@@ -489,7 +514,7 @@ function user_access($string, $account =
  * @return boolean TRUE for blocked users, FALSE for active
  */
 function user_is_blocked($name) {
-  $deny  = db_fetch_object(db_query("SELECT name FROM {users} WHERE status = 0 AND name = LOWER('%s')", $name));
+  $deny  = db_fetch_object(db_query("SELECT name FROM {users} WHERE status = 0 AND name = '%s'", $name));
 
   return $deny;
 }
@@ -546,15 +571,15 @@ function user_search($op = 'search', $ke
         $keys = preg_replace('!\*+!', '%', $keys);
         if (user_access('administer users')) {
           // Administrators can also search in the otherwise private email field.
-          $result = pager_query("SELECT name, uid, mail FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%') OR LOWER(mail) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys, $keys);
+          $result = pager_query("SELECT name, fullname, uid, mail FROM {users} WHERE name LIKE LOWER('%%%s%%') OR LOWER(fullname) LIKE LOWER('%%%s%%') OR mail LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys, $keys, $keys);
           while ($account = db_fetch_object($result)) {
-            $find[] = array('title' => $account->name .' ('. $account->mail .')', 'link' => url('user/'. $account->uid, array('absolute' => TRUE)));
+            $find[] = array('title' => $account->fullname .' ('. $account->name .', '. $account->mail .')', 'link' => url('user/'. $account->uid, array('absolute' => TRUE)));
           }
         }
         else {
-          $result = pager_query("SELECT name, uid FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys);
+          $result = pager_query("SELECT fullname, uid FROM {users} WHERE LOWER(fullname) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys);
           while ($account = db_fetch_object($result)) {
-            $find[] = array('title' => $account->name, 'link' => url('user/'. $account->uid, array('absolute' => TRUE)));
+            $find[] = array('title' => $account->fullname, 'link' => url('user/'. $account->uid, array('absolute' => TRUE)));
           }
         }
         return $find;
@@ -706,7 +731,7 @@ function user_block($op = 'list', $delta
 
       case 1:
         if ($menu = menu_tree()) {
-           $block['subject'] = $user->uid ? check_plain($user->name) : t('Navigation');
+           $block['subject'] = $user->uid ? check_plain($user->fullname) : t('Navigation');
            $block['content'] = $menu;
         }
         return $block;
@@ -714,7 +739,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, variable_get('user_block_whois_new_count', 5));
+          $result = db_query_range('SELECT uid, name, fullname FROM {users} WHERE status != 0 AND access != 0 ORDER BY created DESC', 0, variable_get('user_block_whois_new_count', 5));
           while ($account = db_fetch_object($result)) {
             $items[] = $account;
           }
@@ -733,7 +758,7 @@ function user_block($op = 'list', $delta
           // Perform database queries to gather online user lists.  We use s.timestamp
           // rather than u.access because it is much faster.
           $anonymous_count = sess_count($interval);
-          $authenticated_users = db_query('SELECT DISTINCT u.uid, u.name, s.timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval);
+          $authenticated_users = db_query('SELECT DISTINCT u.uid, u.name, u.fullname, s.timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval);
           $authenticated_count = 0;
           $max_users = variable_get('user_block_max_list_count', 10);
           $items = array();
@@ -810,7 +835,7 @@ function template_preprocess_user_pictur
 function theme_user_list($users, $title = NULL) {
   if (!empty($users)) {
     foreach ($users as $user) {
-      $items[] = theme('username', $user);
+      $items[] = theme('fullname', $user);
     }
   }
   return theme('item_list', $items, $title);
@@ -1303,10 +1328,17 @@ function user_edit_form(&$form_state, $u
       '#title' => t('Username'),
       '#default_value' => $edit['name'],
       '#maxlength' => USERNAME_MAX_LENGTH,
-      '#description' => t('Your preferred username; punctuation is not allowed except for periods, hyphens, and underscores.'),
+      '#description' => t('Your preferred username; only lower cases are allowed; spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'),
       '#required' => TRUE,
     );
   }
+  $form['account']['fullname'] = array('#type' => 'textfield',
+    '#title' => t('Full name'),
+    '#default_value' => $edit['fullname'],
+    '#maxlength' => USERNAME_MAX_LENGTH,
+    '#description' => t('Specify your first and last name.'),
+    '#required' => TRUE,
+  );
   $form['account']['mail'] = array('#type' => 'textfield',
     '#title' => t('E-mail address'),
     '#default_value' => $edit['mail'],
@@ -1389,6 +1421,11 @@ function _user_edit_validate($uid, &$edi
     }
   }
 
+  // Validate the full name:
+  if ($error = user_validate_fullname($edit['fullname'])) {
+    form_set_error('fullname', $error);
+  }
+
   // Validate the e-mail address:
   if ($error = user_validate_mail($edit['mail'])) {
     form_set_error('mail', $error);
@@ -2216,7 +2253,7 @@ function user_register() {
 
   // Remove form_group around default fields if there are no other groups.
   if (!$extra) {
-    foreach (array('name', 'mail', 'pass', 'status', 'roles', 'notify') as $key) {
+    foreach (array('name', 'fullname', 'mail', 'pass', 'status', 'roles', 'notify') as $key) {
       if (isset($form['account'][$key])) {
         $form[$key] = $form['account'][$key];
       }
Index: drupal-6.x-dev/modules/user/user.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v
retrieving revision 1.3
diff -u -p -r1.3 user.pages.inc
--- drupal-6.x-dev/modules/user/user.pages.inc	27 Oct 2007 14:01:12 -0000	1.3
+++ drupal-6.x-dev/modules/user/user.pages.inc	11 Nov 2007 18:49:23 -0000
@@ -12,7 +12,7 @@
 function user_autocomplete($string = '') {
   $matches = array();
   if ($string) {
-    $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER('%s%%')", $string, 0, 10);
+    $result = db_query_range("SELECT name FROM {users} WHERE name LIKE LOWER('%s%%')", $string, 0, 10);
     while ($user = db_fetch_object($result)) {
       $matches[$user->name] = check_plain($user->name);
     }
@@ -150,7 +150,7 @@ function user_logout() {
  * Menu callback; Displays a user or user profile page.
  */
 function user_view($account) {
-  drupal_set_title(check_plain($account->name));
+  drupal_set_title(check_plain($account->fullname));
   // Retrieve all profile fields and attach to $account->content.
   user_build_content($account);
   /**
@@ -222,7 +222,7 @@ function template_preprocess_user_profil
  * @see user_edit_submit().
  */
 function user_edit($account, $category = 'account') {
-  drupal_set_title(check_plain($account->name));
+  drupal_set_title(check_plain($account->fullname));
   return drupal_get_form('user_profile_form', $account, $category);
 }
 
Index: drupal-6.x-dev/themes/garland/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/template.php,v
retrieving revision 1.16
diff -u -p -r1.16 template.php
--- drupal-6.x-dev/themes/garland/template.php	11 Oct 2007 09:51:29 -0000	1.16
+++ drupal-6.x-dev/themes/garland/template.php	11 Nov 2007 18:49:24 -0000
@@ -72,17 +72,17 @@ function phptemplate_menu_local_tasks() 
 }
 
 function phptemplate_comment_submitted($comment) {
-  return t('!datetime — !username',
+  return t('!datetime — !fullname',
     array(
-      '!username' => theme('username', $comment),
+      '!fullname' => theme('fullname', $comment),
       '!datetime' => format_date($comment->timestamp)
     ));
 }
 
 function phptemplate_node_submitted($node) {
-  return t('!datetime — !username',
+  return t('!datetime — !fullname',
     array(
-      '!username' => theme('username', $node),
+      '!fullname' => theme('fullname', $node),
       '!datetime' => format_date($node->created),
     ));
 }
