Smarter user name logic

This commit is contained in:
dave 2010-01-27 20:24:13 +00:00
parent 2743d237a2
commit f05b4ba677

View File

@ -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']) {