index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
models
/
user_cache.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
Unknwon <u@gogs.io>
2018-05-21 14:45:47 +0800
committer
Unknwon <u@gogs.io>
2018-05-21 14:45:47 +0800
commit
05edcde6c90941dec2f80bc178394d249ba6813e
(
patch
)
tree
4681fbdf7ace6f56fe3a7dcf1a5f260581c95dde
/
models/user_cache.go
parent
01ccc2cc967935d4093ad3067e2b45bda80653a3
(
diff
)
routes/user/auth: improve coding style
Diffstat
(limited to 'models/user_cache.go')
-rw-r--r--
models/user_cache.go
5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/user_cache.go b/models/user_cache.go
index 987c019a..45c3721b 100644
--- a/
models/user_cache.go
+++ b/
models/user_cache.go
@@ -4,6 +4,11 @@
package models
+// MailResendCacheKey returns key used for cache mail resend.
+func (u *User) MailResendCacheKey() string {
+ return "MailResend_" + u.IDStr()
+}
+
// TwoFactorCacheKey returns key used for cache two factor passcode.
// e.g. TwoFactor_1_012664
func (u *User) TwoFactorCacheKey(passcode string) string {