mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-04-19 19:14:51 +00:00
24 lines
No EOL
744 B
C#
24 lines
No EOL
744 B
C#
#nullable enable
|
|
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
|
|
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
|
using LBPUnion.ProjectLighthouse.Types;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages;
|
|
|
|
public class PasswordResetRequiredPage : BaseLayout
|
|
{
|
|
public PasswordResetRequiredPage(Database database) : base(database)
|
|
{}
|
|
|
|
public bool WasResetRequest { get; private set; }
|
|
|
|
public IActionResult OnGet()
|
|
{
|
|
User? user = this.Database.UserFromWebRequest(this.Request);
|
|
if (user == null) return this.Redirect("~/login");
|
|
if (!user.PasswordResetRequired) return this.Redirect("~/passwordReset");
|
|
|
|
return this.Page();
|
|
}
|
|
} |