mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-04 10:58:38 +00:00
Only redirect users to email verification if mail is enabled when resetting password
This commit is contained in:
parent
27d92001c3
commit
b2c73ccfc4
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
#nullable enable
|
#nullable enable
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
using LBPUnion.ProjectLighthouse.Configuration;
|
||||||
using LBPUnion.ProjectLighthouse.Helpers;
|
using LBPUnion.ProjectLighthouse.Helpers;
|
||||||
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
|
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
|
||||||
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
|
||||||
|
@ -38,7 +39,8 @@ public class PasswordResetPage : BaseLayout
|
||||||
|
|
||||||
await this.Database.SaveChangesAsync();
|
await this.Database.SaveChangesAsync();
|
||||||
|
|
||||||
if (!user.EmailAddressVerified) return this.Redirect("~/login/sendVerificationEmail");
|
if (!user.EmailAddressVerified && ServerConfiguration.Instance.Mail.MailEnabled)
|
||||||
|
return this.Redirect("~/login/sendVerificationEmail");
|
||||||
|
|
||||||
return this.Redirect("~/");
|
return this.Redirect("~/");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue