Redirect user to email verification on signup, fix email address not setting on register

This commit is contained in:
jvyden 2022-03-03 17:11:13 -05:00
commit e629d79f09
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
2 changed files with 3 additions and 0 deletions

View file

@ -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);

View file

@ -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));
}