Skip to content

Commit be7c439

Browse files
committed
Implemented: FS#2256 - Show contact name instead of login name in dashboardm if user is a client
1 parent 87a30c4 commit be7c439

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

interface/web/dashboard/dashboard.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@
4848
/*
4949
* Let the user welcome
5050
*/
51-
$welcome = sprintf($wb['welcome_user_txt'], $_SESSION['s']['user']['username']);
51+
if($_SESSION['s']['user']['typ'] == 'admin') {
52+
$name = $_SESSION['s']['user']['username'];
53+
} else {
54+
$tmp = $app->db->queryOneRecord("SELECT contact_name FROM client WHERE username = '".$app->db->quote($_SESSION['s']['user']['username'])."'");
55+
$name = $tmp['contact_name'];
56+
}
57+
58+
$welcome = sprintf($wb['welcome_user_txt'], $name);
5259
$app->tpl->setVar('welcome_user', $welcome);
5360

5461

0 commit comments

Comments
 (0)