MCPcopy Create free account
hub / github.com/foxcpp/maddy / IsAccountValid

Method IsAccountValid

internal/auth/shadow/verify.go:33–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31const secsInDay = 86400
32
33func (e *Entry) IsAccountValid() bool {
34 if e.AcctExpiry == -1 {
35 return true
36 }
37
38 nowDays := int(time.Now().Unix() / secsInDay)
39 return nowDays < e.AcctExpiry
40}
41
42func (e *Entry) IsPasswordValid() bool {
43 if e.LastChange == -1 || e.MaxPassAge == -1 || e.InactivityPeriod == -1 {

Callers 3

LookupMethod · 0.80
AuthPlainMethod · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected