From fa284311e87e7c50e2b3788c9d6eaaf3eec7fa7e Mon Sep 17 00:00:00 2001 From: si458 Date: Thu, 27 Nov 2025 10:28:43 +0000 Subject: [PATCH] fix userinfo error modern ui Signed-off-by: si458 --- views/default3.handlebars | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/default3.handlebars b/views/default3.handlebars index 3c03d0d8..1f785824 100644 --- a/views/default3.handlebars +++ b/views/default3.handlebars @@ -2927,6 +2927,7 @@ } function updateSiteAdmin() { + if (!userinfo) return; var serverFeatures = parseInt('{{{serverfeatures}}}'); var siteRights = userinfo.siteadmin; var accountSettingsLocked = ((siteRights != 0xFFFFFFFF) && ((siteRights & 1024) != 0)) || ((features2 & 0x100) != 0); // Not admin and have account features locked, or using a loginToken @@ -3038,6 +3039,7 @@ var backupCodesWarningDone = false; function updateSelf() { + if (!userinfo) return; var authFactorCount = count2factoraAuths(); // Get the number of 2nd factors var accountSettingsLocked = ((userinfo.siteadmin != 0xFFFFFFFF) && ((userinfo.siteadmin & 1024) != 0)); QV('verifyEmailId', (userinfo.emailVerified !== true) && (userinfo.email != null) && (serverinfo.emailcheck == true));