fix #4638 - add Logout Everywhere option to User Profile
This commit is contained in:
@ -23,7 +23,7 @@ namespace Oqtane.Pages
|
||||
_syncManager = syncManager;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostAsync(string returnurl)
|
||||
public async Task<IActionResult> OnPostAsync(string returnurl, string everywhere)
|
||||
{
|
||||
if (HttpContext.User != null)
|
||||
{
|
||||
@ -31,6 +31,10 @@ namespace Oqtane.Pages
|
||||
var user = _userManager.GetUser(HttpContext.User.Identity.Name, alias.SiteId);
|
||||
if (user != null)
|
||||
{
|
||||
if (everywhere == "true")
|
||||
{
|
||||
await _userManager.LogoutUserEverywhere(user);
|
||||
}
|
||||
_syncManager.AddSyncEvent(alias, EntityNames.User, user.UserId, SyncEventActions.Reload);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user