Merge pull request #33 from AnonymousDotNet/lida_Dev
fix: Activated user changes phone number to inactive user bug
This commit is contained in:
commit
d592621190
|
|
@ -407,7 +407,7 @@ public class UserService : IUserService
|
|||
var record = id.Contains("@") ? db.GetUserByEmail(id) : db.GetUserByUserName(id);
|
||||
if (record == null)
|
||||
{
|
||||
record = db.GetUserByUserName(id);
|
||||
record = db.GetUserByPhone(id);
|
||||
}
|
||||
|
||||
if (record == null)
|
||||
|
|
@ -483,7 +483,7 @@ public class UserService : IUserService
|
|||
|
||||
var db = _services.GetRequiredService<IBotSharpRepository>();
|
||||
var UserByphone = db.GetUserByPhone(phone);
|
||||
if (UserByphone != null && UserByphone.Verified)
|
||||
if (UserByphone != null/* && UserByphone.Verified*/)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class UserViewModel
|
|||
CreateDate = user.CreatedTime,
|
||||
UpdateDate = user.UpdatedTime,
|
||||
Avatar = "/user/avatar",
|
||||
RegionCode = user.RegionCode
|
||||
RegionCode = string.IsNullOrWhiteSpace(user.RegionCode) ? "CN" : user.RegionCode
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue