Browse Source

Merge pull request #15792 from lprichar/issues/15791-logout-fail

Bug #15791 - Fix log out fails when EnableLocalLogin is false
pull/15796/head
maliming 4 years ago
committed by GitHub
parent
commit
30690f14d9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Logout.cshtml.cs

9
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,7 +30,12 @@ public class LogoutModel : AccountPageModel
return RedirectSafely(ReturnUrl, ReturnUrlHash);
}
return RedirectToPage("/Account/Login");
if (await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin))
{
return RedirectToPage("/Account/Login");
}
return RedirectToPage("/");
}
public virtual Task<IActionResult> OnPostAsync()

Loading…
Cancel
Save