aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2022-01-08 13:58:46 -0700
committerDerek Stevens <nilix@nilfm.cc>2022-01-08 13:58:46 -0700
commit34c8b2e65616b4b57c0bb03815d7c136471e01fc (patch)
tree757f2f2754fa1bbaaabdc15fa7230cebc645e215
parent26d757e26726fdf46d2569af03baada94127e0ce (diff)
indentalUserDB: update login time and last seen time on session init
-rw-r--r--indentalUserDB/indentalUserDB.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/indentalUserDB/indentalUserDB.go b/indentalUserDB/indentalUserDB.go
index 4698979..a8131fd 100644
--- a/indentalUserDB/indentalUserDB.go
+++ b/indentalUserDB/indentalUserDB.go
@@ -44,6 +44,8 @@ func (self *IndentalUserDB) InitiateSession(user string, password string) (strin
}
sessionId := cookie.GenToken(64)
self.Users[user].Session = sessionId
+ self.Users[user].LoginTime = time.Now()
+ self.Users[user].LastSeen = time.Now()
writeDB(self.Basis, self.Users)
return sessionId, nil
}