From f05b4ba677735e202c2346ba2d4907af01f8e8b3 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 27 Jan 2010 20:24:13 +0000 Subject: [PATCH] Smarter user name logic --- user.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user.inc.php b/user.inc.php index f671ec8..bba9bc7 100644 --- a/user.inc.php +++ b/user.inc.php @@ -214,7 +214,7 @@ function user_load($user, $uid = false) $ret['types'] = $ts; /* Now we can use in_array('judge', $ret['types']) ; */ /* Convenience */ - $ret['name'] = $ret['firstname'].' '.$ret['lastname']; + $ret['name'] = ($ret['firstname'] ? "{$ret['firstname']} " : '').$ret['lastname']; /* Email recipient for "to" field on emails */ if( ($ret['firstname'] || $ret['lastname']) && $ret['email']) {