fix(user): Assign the correct login time at registration time

This commit is contained in:
LinkinStar 2022-12-17 13:44:43 +08:00
parent 8e965adc78
commit 67873a4bc0
1 changed files with 1 additions and 0 deletions

View File

@ -316,6 +316,7 @@ func (us *UserService) UserRegisterByEmail(ctx context.Context, registerUserInfo
userInfo.IPInfo = registerUserInfo.IP
userInfo.MailStatus = entity.EmailStatusToBeVerified
userInfo.Status = entity.UserStatusAvailable
userInfo.LastLoginDate = time.Now()
err = us.userRepo.AddUser(ctx, userInfo)
if err != nil {
return nil, err