This commit is contained in:
Bruno Rybársky 2024-02-07 18:41:15 +01:00
parent 083fa5ac9e
commit 29bdcda68c

@ -1,5 +1,9 @@
let UserInfo = {}; let UserInfo = {};
function isLoggedIn(){
return UserInfo.ID && UserInfo.ID > 0;
}
async function handleResponse(data, successMessage, failureMessage) { async function handleResponse(data, successMessage, failureMessage) {
const statusMessageContainer = document.getElementById("statusMessageContainer"); const statusMessageContainer = document.getElementById("statusMessageContainer");
@ -182,7 +186,7 @@ async function onPageLoad() {
await listUsers(true); await listUsers(true);
} }
} }
if (currentSite === "home" && currentPage === "account") { if (currentSite === "home" && currentPage === "account" && isLoggedIn()) {
await showDashboardGreeting(); await showDashboardGreeting();
} }
} }