Skip to content

Commit 8196283

Browse files
author
Florian Schaal
committed
use contact_firstname and contact_name to greet a client (Fixes: #4143)
1 parent 29709f2 commit 8196283

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/web/dashboard/dashboard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
if($_SESSION['s']['user']['typ'] == 'admin') {
5252
$name = $_SESSION['s']['user']['username'];
5353
} else {
54-
$tmp = $app->db->queryOneRecord("SELECT contact_name FROM client WHERE username = ?", $_SESSION['s']['user']['username']);
55-
$name = $tmp['contact_name'];
54+
$tmp = $app->db->queryOneRecord("SELECT contact_firstname, contact_name FROM client WHERE username = ?", $_SESSION['s']['user']['username']);
55+
$name = @(!empty($tmp['contact_firstname']))?$tmp['contact_firstname'].' '.$tmp['contact_name']:$tmp['contact_name'];
5656
}
5757

5858
$welcome = sprintf($wb['welcome_user_txt'], htmlentities($name, ENT_QUOTES, 'UTF-8'));

0 commit comments

Comments
 (0)