Helpers
User last activity
Helpers for reading last platform activity
User last activity helpers
See User_last_activity (database) for schema and RLS.
Each user has at most one row. Auth records it automatically on JWT issue / token refresh, at most once a day. Reads of another user's row require user_last_activity.read on a shared herd, or platform superadmin.
get_user_last_activity_by_user_id
- Args:
client,user_id - Returns:
{ status, msg, data: IUserLastActivity | null }