ui(users): record last_login on /setup + sortable headers
This commit is contained in:
@@ -144,6 +144,10 @@ func (s *Server) handleUISetupPost(w stdhttp.ResponseWriter, r *stdhttp.Request)
|
||||
Secure: s.deps.Cfg.CookieSecure,
|
||||
Expires: now.Add(8 * time.Hour),
|
||||
})
|
||||
// Record the login so the users-list "Last login" column shows
|
||||
// the moment they completed setup (the regular /login path does
|
||||
// the same; we'd otherwise leave the row showing "never").
|
||||
_ = s.deps.Store.MarkUserLogin(r.Context(), u.ID, now)
|
||||
_ = s.deps.Store.AppendAudit(r.Context(), store.AuditEntry{
|
||||
ID: ulid.Make().String(),
|
||||
UserID: &u.ID,
|
||||
|
||||
Reference in New Issue
Block a user