From d016fb14f43976ba184d3e0597065b15f5eca1f0 Mon Sep 17 00:00:00 2001
From: natrak <>
Date: Wed, 25 Jul 2001 12:21:48 +0000
Subject: common.inc - format_username() now takes a second optional parameter
which gives the real name of the user.
Rest
- updated the calls to format_username() where appropriate to show the name
of the user instead of the account id. Clicking on a name will still give you
the account info etc. If you find a place where the real name is not shown
let me know.
---
account.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'account.php')
diff --git a/account.php b/account.php
index af2205220..0ac0b7ab2 100644
--- a/account.php
+++ b/account.php
@@ -404,10 +404,10 @@ function account_track_site() {
while ($node = db_fetch_object($nresult)) {
$output .= "
". format_plural($node->count, "comment", "comments") ." ". t("attached to") ." 'nid\">". check_output($node->title) ."':";
- $cresult = db_query("SELECT c.subject, c.cid, c.pid, u.userid FROM comments c LEFT JOIN users u ON u.id = c.author WHERE c.lid = $node->nid ORDER BY c.timestamp DESC LIMIT $node->count");
+ $cresult = db_query("SELECT c.subject, c.cid, c.pid, u.userid, u.name FROM comments c LEFT JOIN users u ON u.id = c.author WHERE c.lid = $node->nid ORDER BY c.timestamp DESC LIMIT $node->count");
$output .= "\n";
}
@@ -416,13 +416,13 @@ function account_track_site() {
unset($output);
- $result = db_query("SELECT n.title, n.nid, n.type, n.status, u.userid FROM node n LEFT JOIN users u ON n.author = u.id WHERE ". time() ." - n.timestamp < $period ORDER BY n.timestamp DESC LIMIT 10");
+ $result = db_query("SELECT n.title, n.nid, n.type, n.status, u.userid, u.name FROM node n LEFT JOIN users u ON n.author = u.id WHERE ". time() ." - n.timestamp < $period ORDER BY n.timestamp DESC LIMIT 10");
if (db_num_rows($result)) {
$output .= "\n";
$output .= " ". t("Subject") ." | ". t("Author") ." | ". t("Type") ." | ". t("Status") ." |
\n";
while ($node = db_fetch_object($result)) {
- $output .= " nid\">". check_output($node->title) ." | ". format_username($node->userid) ." | $node->type | ". node_status($node->status) ." |
";
+ $output .= " nid\">". check_output($node->title) ." | ". format_username($node->userid, $node->name) ." | $node->type | ". node_status($node->status) ." |
";
}
$output .= "
";
}
--
cgit v1.2.3