Using a mutable "last active time" from some sort of users table is pretty dangerous for post-hoc analysis because if (when!) something goes wrong, the information is overwritten and gone forever. It's better to use immutable event logs as the post describes.