diff --git a/ProjectLighthouse/Database.cs b/ProjectLighthouse/Database.cs index 22bf6baa..d21ccc57 100644 --- a/ProjectLighthouse/Database.cs +++ b/ProjectLighthouse/Database.cs @@ -76,6 +76,7 @@ public class Database : DbContext Password = password, LocationId = l.Id, Biography = username + " hasn't introduced themselves yet.", + EmailAddress = emailAddress, }; this.Users.Add(user); diff --git a/ProjectLighthouse/Pages/RegisterForm.cshtml.cs b/ProjectLighthouse/Pages/RegisterForm.cshtml.cs index 43480361..5c371aa8 100644 --- a/ProjectLighthouse/Pages/RegisterForm.cshtml.cs +++ b/ProjectLighthouse/Pages/RegisterForm.cshtml.cs @@ -73,6 +73,8 @@ public class RegisterForm : BaseLayout this.Response.Cookies.Append("LighthouseToken", webToken.UserToken); + if (ServerSettings.Instance.SMTPEnabled) return this.Redirect("~/login/sendVerificationEmail"); + return this.RedirectToPage(nameof(LandingPage)); }