Commit 81962831 authored by Florian Schaal's avatar Florian Schaal
Browse files

use contact_firstname and contact_name to greet a client (Fixes: #4143)

parent 29709f20
......@@ -51,8 +51,8 @@ $app->tpl_defaults();
if($_SESSION['s']['user']['typ'] == 'admin') {
$name = $_SESSION['s']['user']['username'];
} else {
$tmp = $app->db->queryOneRecord("SELECT contact_name FROM client WHERE username = ?", $_SESSION['s']['user']['username']);
$name = $tmp['contact_name'];
$tmp = $app->db->queryOneRecord("SELECT contact_firstname, contact_name FROM client WHERE username = ?", $_SESSION['s']['user']['username']);
$name = @(!empty($tmp['contact_firstname']))?$tmp['contact_firstname'].' '.$tmp['contact_name']:$tmp['contact_name'];
}
$welcome = sprintf($wb['welcome_user_txt'], htmlentities($name, ENT_QUOTES, 'UTF-8'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment