@ -233,13 +233,28 @@ namespace Ombi.UI.Modules
var result = await AuthenticationSetup ( userId , username , dateTimeOffset , loginGuid , isOwner ) ;
var result = await AuthenticationSetup ( userId , username , dateTimeOffset , loginGuid , isOwner ) ;
var landingSettings = await LandingPageSettings . GetSettingsAsync ( ) ;
if ( landingSettings . Enabled )
{
if ( ! landingSettings . BeforeLogin ) // After Login
{
var uri = Linker . BuildRelativeUri ( Context , "LandingPageIndex" ) ;
if ( loginGuid ! = Guid . Empty )
{
return CustomModuleExtensions . LoginAndRedirect ( this , result . LoginGuid , null , uri . ToString ( ) ) ;
}
return Response . AsRedirect ( uri . ToString ( ) ) ;
}
}
var retVal = Linker . BuildRelativeUri ( Context , "SearchIndex" ) ;
var retVal = Linker . BuildRelativeUri ( Context , "SearchIndex" ) ;
if ( result . LoginGuid ! = Guid . Empty )
if ( result . LoginGuid ! = Guid . Empty )
{
{
return CustomModuleExtensions . LoginAndRedirect ( this , result . LoginGuid , null , retVal . ToString ( ) ) ;
return CustomModuleExtensions . LoginAndRedirect ( this , result . LoginGuid , null , retVal . ToString ( ) ) ;
}
}
return Response . AsJson ( new { result = true , url = retVal . ToString ( ) } ) ;
return Response . AsJson ( new { result = true , url = retVal . ToString ( ) } ) ;
}
}
private async Task < PlexUsers > IsPlexUser ( string username )
private async Task < PlexUsers > IsPlexUser ( string username )
@ -318,6 +333,21 @@ namespace Ombi.UI.Modules
var m = await AuthenticationSetup ( userId , username , dateTimeOffset , loginGuid , isOwner ) ;
var m = await AuthenticationSetup ( userId , username , dateTimeOffset , loginGuid , isOwner ) ;
var landingSettings = await LandingPageSettings . GetSettingsAsync ( ) ;
if ( landingSettings . Enabled )
{
if ( ! landingSettings . BeforeLogin ) // After Login
{
var uri = Linker . BuildRelativeUri ( Context , "LandingPageIndex" ) ;
if ( m . LoginGuid ! = Guid . Empty )
{
return CustomModuleExtensions . LoginAndRedirect ( this , m . LoginGuid , null , uri . ToString ( ) ) ;
}
return Response . AsRedirect ( uri . ToString ( ) ) ;
}
}
var retVal = Linker . BuildRelativeUri ( Context , "SearchIndex" ) ;
var retVal = Linker . BuildRelativeUri ( Context , "SearchIndex" ) ;
if ( m . LoginGuid ! = Guid . Empty )
if ( m . LoginGuid ! = Guid . Empty )
{
{