recoverycode
This commit is contained in:
parent
11fce401e7
commit
8ba92bd5b6
|
@ -17,6 +17,8 @@ func RecoverByEmail(email string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
recoverycode := randBytes(16)
|
recoverycode := randBytes(16)
|
||||||
|
u.Delete("recoverykey")
|
||||||
|
u.Delete("recoverytime")
|
||||||
|
|
||||||
u.Set("recoverycode", string(recoverycode))
|
u.Set("recoverycode", string(recoverycode))
|
||||||
u.Set("recoverytime", fmt.Sprintf("%d", time.Now().Add(time.Minute*60).Unix()))
|
u.Set("recoverytime", fmt.Sprintf("%d", time.Now().Add(time.Minute*60).Unix()))
|
||||||
|
|
Loading…
Reference in New Issue