From 78015c0a7293aa9338c9292354a19d8128dfebf4 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 8 Oct 2005 02:00:36 +0000 Subject: [PATCH] r500: Use a "Guest" string if there's no user information present in fetch_user_display_name() --- includes/functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 922a633..cc48d1e 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -15,10 +15,17 @@ // should be able to be removed by the final version as registration should set this function fetch_user_display_name(&$userinfo) { + global $bugsys; + if (!$userinfo['displayname']) { $userinfo['displayname'] = ucwords(trim(str_replace(array('@', '.com', '.net', '.edu', '.org', '.info', '.biz'), ' ', $userinfo['email']))); } + + if (!$userinfo['userid']) + { + $userinfo['displayname'] = $bugsys->lang->string('Guest'); + } } // ################## Start construct_option_select ################## -- 2.22.5