MCPcopy Create free account
hub / github.com/gogs/gogs / generateTimeLimitedUserCode

Function generateTimeLimitedUserCode

internal/userutil/userutil.go:47–57  ·  view source on GitHub ↗
(userID int64, email, name, password, rands string, minutes int)

Source from the content-addressed store, hash-verified

45}
46
47func generateTimeLimitedUserCode(userID int64, email, name, password, rands string, minutes int) string {
48 code := tool.CreateTimeLimitCode(
49 fmt.Sprintf("%d%s%s%s%s", userID, email, strings.ToLower(name), password, rands),
50 minutes,
51 nil,
52 )
53
54 // Add tailing hex username
55 code += hex.EncodeToString([]byte(strings.ToLower(name)))
56 return code
57}
58
59// CustomAvatarPath returns the absolute path of the user custom avatar file.
60func CustomAvatarPath(userID int64) string {

Callers 2

GenerateActivateCodeFunction · 0.85

Calls 1

CreateTimeLimitCodeFunction · 0.92

Tested by

no test coverage detected