From 14f53bd7f091ae5dd40671ad1154ed11be7a2c8e Mon Sep 17 00:00:00 2001 From: "cyeh%bluemartini.com" <> Date: Wed, 26 Apr 2000 08:43:51 +0000 Subject: better implementation of realnames support. remove overhead of two sql calls from bug_form. --- globals.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'globals.pl') diff --git a/globals.pl b/globals.pl index 948fa7feb..32772df56 100644 --- a/globals.pl +++ b/globals.pl @@ -546,14 +546,14 @@ sub InsertNewUser { return $password; } -sub DBID_to_real_name { +sub DBID_to_real_or_loginname { my ($id) = (@_); - SendSQL("SELECT realname FROM profiles WHERE userid = $id"); - my ($r) = FetchSQLData(); + SendSQL("SELECT login_name,realname FROM profiles WHERE userid = $id"); + my ($l, $r) = FetchSQLData(); if ($r eq "") { - return; + return $l; } else { - return "($r)"; + return "$l ($r)"; } } -- cgit v1.2.3-24-g4f1b