diff --git a/assets/script.js b/assets/script.js index e599b39..29a81db 100644 --- a/assets/script.js +++ b/assets/script.js @@ -1,5 +1,9 @@ let UserInfo = {}; +function isLoggedIn(){ + return UserInfo.ID && UserInfo.ID > 0; +} + async function handleResponse(data, successMessage, failureMessage) { const statusMessageContainer = document.getElementById("statusMessageContainer"); @@ -182,7 +186,7 @@ async function onPageLoad() { await listUsers(true); } } - if (currentSite === "home" && currentPage === "account") { + if (currentSite === "home" && currentPage === "account" && isLoggedIn()) { await showDashboardGreeting(); } }