resolve login issue related to 'LoginOptions:TwoFactor' and order list of files alphabetically

This commit is contained in:
Shaun Walker
2022-05-13 12:03:34 -04:00
parent dde7094fe3
commit ecc9aa40d7
2 changed files with 6 additions and 3 deletions

View File

@ -206,7 +206,7 @@
}
else
{
if (PageState.Site.Settings["LoginOptions:TwoFactor"] == "required" || user.TwoFactorRequired)
if ((PageState.Site.Settings.ContainsKey("LoginOptions:TwoFactor") && PageState.Site.Settings["LoginOptions:TwoFactor"] == "required") || user.TwoFactorRequired)
{
twofactor = true;
validated = false;