This commit is contained in:
Jamie.Rees 2016-11-25 08:40:38 +00:00
parent eadcba91c4
commit 7a41aef838
5 changed files with 40 additions and 11 deletions

View file

@ -62,12 +62,14 @@ namespace PlexRequests.UI.Modules
{
return Context.GetRedirect(string.IsNullOrEmpty(baseUrl) ? "~/wizard" : $"~/{baseUrl}/wizard");
}
var redirectPath = string.IsNullOrEmpty(baseUrl) ? "~/userlogin" : $"~/{baseUrl}/userlogin";
if (Session[SessionKeys.UsernameKey] == null && Context?.CurrentUser == null)
if (!Request.IsAjaxRequest())
{
return Context.GetRedirect(redirectPath);
var redirectPath = string.IsNullOrEmpty(baseUrl) ? "~/userlogin" : $"~/{baseUrl}/userlogin";
if (Session[SessionKeys.UsernameKey] == null && Context?.CurrentUser == null)
{
return Context.GetRedirect(redirectPath);
}
}
return null;