mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-06 20:08:40 +00:00
Added login redirection, level icon background and fixed bugs (#371)
This commit is contained in:
parent
bf90d0ee85
commit
3c8f195740
8 changed files with 26 additions and 8 deletions
|
@ -22,7 +22,7 @@ public class LoginForm : BaseLayout
|
|||
public string? Error { get; private set; }
|
||||
|
||||
[UsedImplicitly]
|
||||
public async Task<IActionResult> OnPost(string username, string password)
|
||||
public async Task<IActionResult> OnPost(string username, string password, string redirect)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(username))
|
||||
{
|
||||
|
@ -105,7 +105,11 @@ public class LoginForm : BaseLayout
|
|||
if (user.PasswordResetRequired) return this.Redirect("~/passwordResetRequired");
|
||||
if (ServerConfiguration.Instance.Mail.MailEnabled && !user.EmailAddressVerified) return this.Redirect("~/login/sendVerificationEmail");
|
||||
|
||||
return this.RedirectToPage(nameof(LandingPage));
|
||||
if (string.IsNullOrWhiteSpace(redirect))
|
||||
{
|
||||
return this.RedirectToPage(nameof(LandingPage));
|
||||
}
|
||||
return this.Redirect(redirect);
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue