mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-07 16:16:37 +08:00
fix(user): clear need_change_password and invalidate cache on password change
This commit is contained in:
@@ -174,10 +174,14 @@ func (s *userServiceImpl) UpdatePassword(ctx context.Context, id uint64, oldPass
|
||||
return err
|
||||
}
|
||||
|
||||
return updateUserColumns(ctx, id, map[string]any{
|
||||
if err := updateUserColumns(ctx, id, map[string]any{
|
||||
"password": user.Password,
|
||||
columnUpdatedAt: time.Now(),
|
||||
})
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
invalidateUserCache(ctx, id)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *userServiceImpl) VerifyPassword(ctx context.Context, id uint64, password string) bool {
|
||||
|
||||
Reference in New Issue
Block a user