Merge pull request #43 from AnonymousDotNet/lida_Dev

Lida dev
This commit is contained in:
Haiping 2024-11-12 09:31:45 +00:00 committed by GitHub
commit 31d72e2e47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ public partial class MongoRepository
string phoneSecond = phone.StartsWith("+86") ? phone.Replace("+86", "") : $"+86{phone}";
var user = _dc.Users.AsQueryable().FirstOrDefault(x => (x.Phone == phone || x.Phone == phoneSecond) && x.Type != UserType.Affiliate && (x.RegionCode == regionCode || x.RegionCode == null));
var user = _dc.Users.AsQueryable().FirstOrDefault(x => (x.Phone == phone || x.Phone == phoneSecond) && x.Type != UserType.Affiliate && (x.RegionCode == regionCode || string.IsNullOrWhiteSpace(x.RegionCode)));
return user != null ? user.ToUser() : null;
}