fix userinfo error modern ui

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458
2025-11-27 10:28:43 +00:00
parent 30f8e62c3f
commit fa284311e8

View File

@@ -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));