From 491550531fbe1885a12693cecdf02a9970c2672d Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Wed, 25 Jul 2001 12:21:49 +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. --- includes/common.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index 19a79c375..4a6339114 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -204,8 +204,8 @@ function format_date($timestamp, $type = "medium", $format = "") { return $date; } -function format_username($username) { - if ($username) return (user_access("administer users") ? "$username" : "$username"); +function format_username($username, $realname="") { + if ($username) return (user_access("administer users") ? "". check_output($realname ? $realname : $username) ."" : "". check_output($realname ? $realname : $username) .""); else return variable_get(anonymous, "Anonymous"); } -- cgit v1.2.3