diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs index 03d7f753..62752d42 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs @@ -105,7 +105,7 @@ along with this program. If not, see ."; $"If this was you, your {ServerConfiguration.Instance.Customization.ServerName} password can be set at the following link:\n" + $"{ServerConfiguration.Instance.ExternalUrl}/passwordReset?token={resetToken.ResetToken}"; - SMTPHelper.SendEmail(user.EmailAddress, $"Project Lighthouse Password Setup Request for {user.Username}", messageBody); + SMTPHelper.SendEmail(email, $"Project Lighthouse Password Setup Request for {user.Username}", messageBody); this.database.PasswordResetTokens.Add(resetToken); diff --git a/ProjectLighthouse/Helpers/SanitizationHelper.cs b/ProjectLighthouse/Helpers/SanitizationHelper.cs index d78ffceb..50366631 100644 --- a/ProjectLighthouse/Helpers/SanitizationHelper.cs +++ b/ProjectLighthouse/Helpers/SanitizationHelper.cs @@ -16,9 +16,7 @@ public static class SanitizationHelper {"'", "'"}, }; - public static bool IsValidEmail - (string? email) => - !string.IsNullOrWhiteSpace(email) && new EmailAddressAttribute().IsValid(email); + public static bool IsValidEmail(string? email) => !string.IsNullOrWhiteSpace(email) && new EmailAddressAttribute().IsValid(email); public static void SanitizeStringsInClass(object? instance) {