// verify code when reset password func VerifyUserResetPwdCode(user *User, code string) bool { days := utils.ResetPwdCodeLives data := utils.ToStr(user.Id) + user.Email + user.UserName + user.Password + user.Rands + user.Updated.String() return utils.VerifyTimeLimitCode(data, days, code) }
// verify active code when active account func VerifyUserActiveCode(user *User, code string) bool { days := utils.ActiveCodeLives data := utils.ToStr(user.Id) + user.Email + user.UserName + user.Password + user.Rands return utils.VerifyTimeLimitCode(data, days, code) }