AmendHub

jcs

/

subtext

/

amendments

/

121

session: Touch user last_seen_at upon login


jcs made amendment 121 about 1 year ago
--- session.c Wed Jun 1 16:46:32 2022 +++ session.c Sun Jun 5 09:21:28 2022 @@ -104,10 +104,13 @@ session_run(struct uthread *uthread, void *arg) } /* update session log */ - if (s->user) + if (s->user) { + s->user->last_seen_at = Time; + user_save(s->user); + strlcpy(s->log.username, s->user->username, sizeof(s->log.username)); - else + } else strlcpy(s->log.username, GUEST_USERNAME, sizeof(s->log.username)); strlcpy(s->log.via, s->via, sizeof(s->log.via));