Skip to content

Commit

Permalink
fix(register): tmp deactivation of email sent
Browse files Browse the repository at this point in the history
  • Loading branch information
loiclouvet committed Dec 7, 2023
1 parent f5d725d commit 81f6f8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions function/Service/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ public async Task<User> Register(string lastName, string firstName, string birth
user.AuthTokenExpiration = tokenValidityDate;

// Send email
var emailValidationToken = GenerateUserToken(email, DateTime.UtcNow.AddHours(2), userId, true);
string originalEmailHtml = await File.ReadAllTextAsync(Path.Combine(BaseFunctionDirectory, "../Assets/mail-validateaccount.html"));
originalEmailHtml = originalEmailHtml.Replace("%%YES_LINK%%", $"{_functionBaseUrl}/validate/{emailValidationToken}");

await SendEmail(email, originalEmailHtml, string.Empty, "Validation de ton compte Plastic Origins");
// ⚠️ Temporary deactivation of email because of MailJet issue
// var emailValidationToken = GenerateUserToken(email, DateTime.UtcNow.AddHours(2), userId, true);
// string originalEmailHtml = await File.ReadAllTextAsync(Path.Combine(BaseFunctionDirectory, "../Assets/mail-validateaccount.html"));
// originalEmailHtml = originalEmailHtml.Replace("%%YES_LINK%%", $"{_functionBaseUrl}/validate/{emailValidationToken}");
// await SendEmail(email, originalEmailHtml, string.Empty, "Validation de ton compte Plastic Origins");

//Contract.Ensures(user != null);
return user;
Expand Down

0 comments on commit 81f6f8b

Please sign in to comment.