diff --git a/DysonNetwork.Pass/Account/AccountService.cs b/DysonNetwork.Pass/Account/AccountService.cs index edcd9d7..a3fb00e 100644 --- a/DysonNetwork.Pass/Account/AccountService.cs +++ b/DysonNetwork.Pass/Account/AccountService.cs @@ -28,6 +28,7 @@ public class AccountService( EmailService mailer, PusherService.PusherServiceClient pusher, IStringLocalizer localizer, + IStringLocalizer emailLocalizer, ICacheService cache, ILogger logger, INatsConnection nats @@ -432,12 +433,14 @@ public class AccountService( .Where(c => c.Type == AccountContactType.Email) .Where(c => c.VerifiedAt != null) .Where(c => c.IsPrimary) + .Where(c => c.AccountId == account.Id) .Include(c => c.Account) .FirstOrDefaultAsync(); if (contact is null) { logger.LogWarning( - "Unable to send factor code to #{FactorId} with, due to no contact method was found..." + "Unable to send factor code to #{FactorId} with, due to no contact method was found...", + factor.Id ); return; } @@ -446,7 +449,7 @@ public class AccountService( .SendTemplatedEmailAsync( account.Nick, contact.Content, - localizer["VerificationEmail"], + emailLocalizer["VerificationEmail"], new VerificationEmailModel { Name = account.Name,