public static function loggedIn() { $auth = Current_User::getAuthorization(); $template['GREETING'] = dgettext('users', 'Hello'); $template['USERNAME'] = Current_User::getUsername(); $template['DISPLAY_NAME'] = Current_User::getDisplayName(); $template['PANEL'] = $template['MODULES'] = PHPWS_ControlPanel::panelLink(); $logout_link = $auth->getLogoutLink(); $template['ACCOUNT'] = '<a href="index.php?module=users&action=user&tab=my_page">' . dgettext('users', '<span class="glyphicon glyphicon-user"></span> Account') . '</a>'; if ($logout_link) { $template['LOGOUT'] =& $logout_link; } else { $template['LOGOUT'] = PHPWS_Text::moduleLink(dgettext('users', '<span class="fa fa-sign-out"></span> Log Out'), 'users', array('action' => 'user', 'command' => 'logout')); } $template['HOME_USER_PANEL'] = $template['HOME'] = PHPWS_Text::moduleLink(dgettext('users', 'Home')); $usermenu = PHPWS_User::getUserSetting('user_menu'); return PHPWS_Template::process($template, 'users', 'usermenus/' . $usermenu); }