fix: Error caused by not including prefix when modifying user's mobile number.

This commit is contained in:
AnonymousDotNet 2024-10-11 14:31:54 +08:00
parent 41aaa7ea49
commit 836fa0e723

View file

@ -520,6 +520,11 @@ public class UserService : IUserService
return false;
}
if ((record.UserName.Substring(0, 3) == "+86" || record.FirstName.Substring(0, 3) == "+86") && phone.Substring(0, 3) != "+86")
{
phone = $"+86{phone}";
}
db.UpdateUserPhone(record.Id, phone);
return true;
}