function fp_render_greeting
Search API
4.x theme.inc | fp_render_greeting() |
5.x theme.inc | fp_render_greeting() |
This displays a friendly message to the user, and provides a logout link at the top.
1 call to fp_render_greeting()
- fp_display_page in includes/
theme.inc - Output the contents of the $page variable to the screen. $page is an array containing details about the page, as well as its original menu item (router_item) definition.
File
- includes/
theme.inc, line 763
Code
function fp_render_greeting() {
global $user;
if ($user->id < 1) {
// No one is logged in! Don't display.
return "";
}
$rtn = "";
$today = date("D, F jS, Y", time("today"));
$dname = $user->name;
if ($user->f_name != "" || $user->l_name != "") {
$dname = trim($user->f_name . " " . $user->l_name) . " ($user->name)";
}
$rtn .= "<div class='flightpath-greeting-message'>
Welcome $dname! Today is $today. " . l("Log out?", "logout") . "
</div>";
return $rtn;
}