fix: phone is empty judgment

This commit is contained in:
AnonymousDotNet 2024-09-20 16:16:50 +08:00
parent bad946b073
commit 1ff151d036

View file

@ -56,7 +56,7 @@ public class UserService : IUserService
record = user;
record.Email = user.Email?.ToLower();
if (user.Phone != null)
if (!string.IsNullOrWhiteSpace(user.Phone))
{
record.Phone = "+" + Regex.Match(user.Phone, @"\d+").Value;
}