From 54c9a2cc07390ce4cb5dacf0fdcaffcf61b05b0e Mon Sep 17 00:00:00 2001 From: Hoang Date: Tue, 23 Nov 2021 17:47:23 +0700 Subject: [PATCH] update Change password --- user/handle.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/user/handle.go b/user/handle.go index 6dc9b0f..6f0166d 100644 --- a/user/handle.go +++ b/user/handle.go @@ -294,8 +294,9 @@ func ChangeUserPassword(userID string, opt model.ChangePasswordOptions) error { // Update password if err = updateOneByCondition(ctx, bson.M{"_id": user.ID}, bson.M{ "$set": bson.M{ - "hashedPassword": internal.HashPassword(opt.NewPassword), - "updatedAt": internal.Now(), + "hashedPassword": internal.HashPassword(opt.NewPassword), + "requireToChangePassword": false, + "updatedAt": internal.Now(), }, }); err != nil { return err