@ -17,6 +17,8 @@ func RecoverByEmail(email string) {
return
}
recoverycode := randBytes(16)
u.Delete("recoverykey")
u.Delete("recoverytime")
u.Set("recoverycode", string(recoverycode))
u.Set("recoverytime", fmt.Sprintf("%d", time.Now().Add(time.Minute*60).Unix()))