last_seen variable is added to API UsersManager/API::getUsers if it exists.
I'm a bit worried about performance and wondering if we could rather have a new API for that? We have a couple of usages even within Piwik where we call
UsersManager.getUsers. We would ideally test it with eg 30K users (as some Piwik installations do have that many users). The option seems to be autoloaded so it will likely not trigger DB query for each user but still good to check before we regress there
This PR may need to be re-worked now. There's a method in UsersManager\API to add last_seen to multiple users: enrichUsersWithLastSeen. Used in a new API method.
@Morerice if you could look at the last comments and maybe tweak the PR that would be great 👍
Thank you for this proposed pull request.
Because it was last updated more than one month ago, it is our policy to close pull requests opened for a long time without updates. If you would like to continue work on the pull request, please simply ping us to have it re-opened (after you have pushed a new commit).
We hope you understand this and we look forward to seeing an update from you on this pull request or another one!