Merge pull request #12 from AnonymousDotNet/lida_dev

fix: phone is empty judgment
This commit is contained in:
Haiping 2024-09-20 06:20:07 -05:00 committed by GitHub
commit a09d47a95f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,7 +58,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;
}