From ee3c2bcbf661b811f660b0d14284dd7a02176e9c Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 24 Feb 2023 10:32:43 +0800 Subject: [PATCH] Update Logout.cshtml.cs --- .../src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs index 097c00c307..ce1ecd0e82 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs @@ -1,6 +1,8 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Account.Settings; using Volo.Abp.Identity; +using Volo.Abp.Settings; namespace Volo.Abp.Account.Web.Pages.Account; @@ -28,8 +30,7 @@ public class LogoutModel : AccountPageModel return RedirectSafely(ReturnUrl, ReturnUrlHash); } - var enableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin); - if (enableLocalLogin) + if (await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin)) { return RedirectToPage("/Account/Login"); }