beego/wetalk

hours := setting.ActiveCodeLives

Closed this issue · 3 comments

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

}

Which line and file?

grep -H -r "CreateUserActiveCode(user" /your/dir

./modules/auth/auth.go:func CreateUserActiveCode(user *models.User, startInf interface{}) string {

thanks