Fix that name is not returned for admins
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
@@ -26,28 +26,24 @@
|
||||
* @author Florian Lippert <flo@syscp.org>
|
||||
*/
|
||||
|
||||
function getCorrectFullUserDetails($userinfo)
|
||||
{
|
||||
function getCorrectFullUserDetails($userinfo) {
|
||||
$returnval = '';
|
||||
|
||||
if(isset($userinfo['firstname']) && isset($userinfo['name']) && isset($userinfo['company']))
|
||||
{
|
||||
if($userinfo['company'] == '')
|
||||
{
|
||||
|
||||
if (isset($userinfo['firstname']) && isset($userinfo['name']) && isset($userinfo['company'])) {
|
||||
if ($userinfo['company'] == '') {
|
||||
$returnval = $userinfo['name'] . ', ' . $userinfo['firstname'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if($userinfo['name'] != ''
|
||||
&& $userinfo['firstname'] != '')
|
||||
{
|
||||
else {
|
||||
if ($userinfo['name'] != ''
|
||||
&& $userinfo['firstname'] != '') {
|
||||
$returnval = $userinfo['name'] . ', ' . $userinfo['firstname'] . ' | ' . $userinfo['company'];
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$returnval = $userinfo['company'];
|
||||
}
|
||||
}
|
||||
} elseif (isset($userinfo['name'])) {
|
||||
$returnval = $userinfo['name'];
|
||||
}
|
||||
|
||||
return $returnval;
|
||||
|
||||
Reference in New Issue
Block a user