Skip to content
Snippets Groups Projects
Commit be7c439f authored by tbrehm's avatar tbrehm
Browse files

Implemented: FS#2256 - Show contact name instead of login name in dashboardm if user is a client

parent 87a30c47
No related branches found
No related tags found
2 merge requests!46Master,!21Master
......@@ -48,7 +48,14 @@ $app->tpl_defaults();
/*
* Let the user welcome
*/
$welcome = sprintf($wb['welcome_user_txt'], $_SESSION['s']['user']['username']);
if($_SESSION['s']['user']['typ'] == 'admin') {
$name = $_SESSION['s']['user']['username'];
} else {
$tmp = $app->db->queryOneRecord("SELECT contact_name FROM client WHERE username = '".$app->db->quote($_SESSION['s']['user']['username'])."'");
$name = $tmp['contact_name'];
}
$welcome = sprintf($wb['welcome_user_txt'], $name);
$app->tpl->setVar('welcome_user', $welcome);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment