hours := setting.ActiveCodeLives
Closed this issue · 3 comments
milliyang commented
hours := setting.ActiveCodeLives == should be ==> minutes
// create a time limit code for user active
func CreateUserActiveCode(user *models.User, startInf interface{}) string {
hours := setting.ActiveCodeLives
data := utils.ToStr(user.Id) + user.Email + user.UserName + user.Password + user.Rands
code := utils.CreateTimeLimitCode(data, hours, startInf)
// add tail hex username
code += hex.EncodeToString([]byte(user.UserName))
return code
}
unknwon commented
Which line and file?
milliyang commented
grep -H -r "CreateUserActiveCode(user" /your/dir
./modules/auth/auth.go:func CreateUserActiveCode(user *models.User, startInf interface{}) string {
slene commented
thanks