fix: update ModifyUserPhone API
This commit is contained in:
parent
4b2a94a539
commit
0f930b4c46
|
|
@ -636,6 +636,8 @@ public class UserService : IUserService
|
|||
|
||||
record.Phone = phone;
|
||||
record.RegionCode = regionCode;
|
||||
record.UserName = phone;
|
||||
record.FirstName = phone;
|
||||
|
||||
var hooks = _services.GetServices<IAuthenticationHook>();
|
||||
foreach (var hook in hooks)
|
||||
|
|
|
|||
|
|
@ -133,7 +133,9 @@ public partial class MongoRepository
|
|||
var filter = Builders<UserDocument>.Filter.Eq(x => x.Id, userId);
|
||||
var update = Builders<UserDocument>.Update.Set(x => x.Phone, phone)
|
||||
.Set(x => x.UpdatedTime, DateTime.UtcNow)
|
||||
.Set(x => x.RegionCode, regionCode);
|
||||
.Set(x => x.RegionCode, regionCode)
|
||||
.Set(x => x.UserName, phone)
|
||||
.Set(x => x.FirstName, phone);
|
||||
_dc.Users.UpdateOne(filter, update);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue