handle; } elseif (!empty($_SESSION['user'])) { $isLoggedIn = true; $username = $_SESSION['user']; } else { $isLoggedIn = false; $username = ''; } $template->assign([ 'authIsLoggedIn' => $isLoggedIn, 'authUsername' => $username, 'authRole' => $logged_in, ]);