diff --git a/DysonNetwork.Pass/Account/AccountService.cs b/DysonNetwork.Pass/Account/AccountService.cs index 0b8e05a4..e5d2c084 100644 --- a/DysonNetwork.Pass/Account/AccountService.cs +++ b/DysonNetwork.Pass/Account/AccountService.cs @@ -58,7 +58,9 @@ public class AccountService( if (account is not null) return account; var contact = await db.AccountContacts - .Where(c => c.Content == probe) + .Where(c => c.Type == Shared.Models.AccountContactType.Email || + c.Type == Shared.Models.AccountContactType.PhoneNumber) + .Where(c => EF.Functions.ILike(c.Content, probe)) .Include(c => c.Account) .FirstOrDefaultAsync(); return contact?.Account;