forked from extern/egroupware
Created a little bit cleaner version of display_fullname()
This commit is contained in:
parent
66bea73872
commit
3f3c2e7d01
@ -303,27 +303,27 @@
|
||||
*/
|
||||
function display_fullname($lid = '', $firstname = '', $lastname = '')
|
||||
{
|
||||
if (! $lid && ! $firstname && ! $lastname) {
|
||||
if (! $lid && ! $firstname && ! $lastname)
|
||||
{
|
||||
global $phpgw_info;
|
||||
$lid = $phpgw_info['user']['account_lid'];
|
||||
$firstname = $phpgw_info['user']['firstname'];
|
||||
$lastname = $phpgw_info['user']['lastname'];
|
||||
}
|
||||
|
||||
if (! $firstname && ! $lastname) {
|
||||
$s = $lid;
|
||||
if ($firstname)
|
||||
{
|
||||
$a[] = $firstname;
|
||||
}
|
||||
if (! $firstname && $lastname) {
|
||||
$s = $lastname;
|
||||
|
||||
if ($lastname)
|
||||
{
|
||||
$a[] = $lastname;
|
||||
}
|
||||
if ($firstname && ! $lastname) {
|
||||
$s = $firstname;
|
||||
}
|
||||
if ($firstname && $lastname) {
|
||||
$s = "$lastname, $firstname";
|
||||
}
|
||||
return $s;
|
||||
|
||||
return '<' . $lid . '> ' . implode(', ',$a);
|
||||
}
|
||||
|
||||
/*!
|
||||
@function grab_owner_name
|
||||
@abstract grab the owner name
|
||||
|
Loading…
Reference in New Issue
Block a user