whisper-money/app
Víctor Falcón fcf2d3d1ad
feat(users): track last login and last active timestamps (#516)
## What

Adds two timestamp columns to `users`:

- **`last_logged_in_at`** — set by an `UpdateLastLoggedInAt` listener on
Laravel's `Login` event. Records each explicit authentication (login
form or remember-me re-auth). Does **not** update on plain session-based
requests.
- **`last_active_at`** — set by a `TrackLastActiveAt` middleware on
authenticated web requests. Records the last moment the user did
anything. Throttled to at most one write per 5 minutes to avoid a DB
write on every request.

## Why

`last_logged_in_at` answers "when did they last authenticate";
`last_active_at` answers "when were they last using the app" (any
screen/activity), which a session-based login does not capture.

## Tests

- Login records `last_logged_in_at`
- Authenticated request records `last_active_at`
- Throttle window respected (no rewrite within 5 min) and refreshed once
it passes

Migrations not yet run on environments.
2026-06-10 11:01:30 +02:00
..
Actions feat: parent/child category tree (#474) 2026-06-03 19:30:12 +02:00
Console/Commands test(open-banking): e2e coverage for Enable Banking connection flows (#509) 2026-06-09 11:58:50 +02:00
Contracts feat(open-banking): finalize bank connection without a session via state token (#498) 2026-06-06 12:12:07 +02:00
Enums feat(analysis): project-aware transaction analysis (#513) 2026-06-09 15:32:07 +02:00
Events
…
Exceptions/Banking Handle transient EnableBanking sync failures (#358) 2026-05-06 09:24:05 +02:00
Features feat(transactions): save and reuse transaction filters (#496) 2026-06-05 18:00:14 +02:00
Http feat(users): track last login and last active timestamps (#516) 2026-06-10 11:01:30 +02:00
Jobs feat(settings): let users disable bank transactions email (#472) 2026-06-02 12:24:39 +02:00
Listeners feat(users): track last login and last active timestamps (#516) 2026-06-10 11:01:30 +02:00
Mail feat(leads): add user lead re-invite campaign (#432) 2026-05-26 08:35:31 +02:00
Models feat(users): track last login and last active timestamps (#516) 2026-06-10 11:01:30 +02:00
Notifications fix: verify email via signed link without requiring login (#490) 2026-06-05 10:01:32 +02:00
Policies refactor(policies): extract HandlesUserOwnership trait (#478) 2026-06-03 17:43:30 +02:00
Providers feat(users): track last login and last active timestamps (#516) 2026-06-10 11:01:30 +02:00
Rules feat: parent/child category tree (#474) 2026-06-03 19:30:12 +02:00
Services feat(analysis): break down spending by sub-category (#508) 2026-06-08 14:53:36 +02:00