update Change password
This commit is contained in:
parent
4264ef71f1
commit
54c9a2cc07
|
@ -294,8 +294,9 @@ func ChangeUserPassword(userID string, opt model.ChangePasswordOptions) error {
|
||||||
// Update password
|
// Update password
|
||||||
if err = updateOneByCondition(ctx, bson.M{"_id": user.ID}, bson.M{
|
if err = updateOneByCondition(ctx, bson.M{"_id": user.ID}, bson.M{
|
||||||
"$set": bson.M{
|
"$set": bson.M{
|
||||||
"hashedPassword": internal.HashPassword(opt.NewPassword),
|
"hashedPassword": internal.HashPassword(opt.NewPassword),
|
||||||
"updatedAt": internal.Now(),
|
"requireToChangePassword": false,
|
||||||
|
"updatedAt": internal.Now(),
|
||||||
},
|
},
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue