When logging out as admin remove the username from the session

pull/531/head
tidusjar 8 years ago
parent 2f415cc1fd
commit 9aa60dfc23

@ -61,7 +61,14 @@ namespace PlexRequests.UI.Modules
return View["Index", model];
};
Get["/logout"] = x => this.LogoutAndRedirect(!string.IsNullOrEmpty(BaseUrl) ? $"~/{BaseUrl}/" : "~/");
Get["/logout"] = x =>
{
if (Session[SessionKeys.UsernameKey] != null)
{
Session.Delete(SessionKeys.UsernameKey);
}
return this.LogoutAndRedirect(!string.IsNullOrEmpty(BaseUrl) ? $"~/{BaseUrl}/" : "~/");
};
Post["/login"] = x =>
{

Loading…
Cancel
Save