Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add last seen to the UserManager Api #18053

Merged
merged 12 commits into from Sep 27, 2021
Merged

Conversation

peterhashair
Copy link
Contributor

@peterhashair peterhashair commented Sep 23, 2021

Description:

add the last seen field to the UserManager.getUsers Api.

File change

  • plugins/UsersManager/API.php ( add date_last_seen field to the api return)
  • plugins/UsersManager/UserAccessFilter.php (it actualy loop users twice if not super admin. one in enrichUsers on in filterUsers)
  • plugins/UsersManager/tests/Integration/UsersManagerTest.php ( add test around the new field)
  • plugins/UsersManager/tests/System/ApiTest.php (accidently copied something there. Will remove)

Review

add last seen to the UserManager Api
@peterhashair peterhashair linked an issue Sep 23, 2021 that may be closed by this pull request
Peter Zhang added 3 commits September 23, 2021 20:02
reverse format change
fix a typo
update array index
@peterhashair peterhashair added this to the 4.5.0 milestone Sep 23, 2021
@peterhashair peterhashair added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 23, 2021
remove an accidentaly copy and paste
@peterhashair peterhashair removed the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 23, 2021
Peter Zhang and others added 4 commits September 23, 2021 22:00
update file
reverse update
update Unit Test
…rg/matomo into m-10550-api-user-lastseen-field
@peterhashair peterhashair marked this pull request as ready for review September 23, 2021 22:25
@peterhashair peterhashair added Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. labels Sep 23, 2021
@peterhashair
Copy link
Contributor Author

For the api date_last_seen maybe is not a propery word, if we addt ime onto as its value. Suggest use last_seen if we want to use time, or we can remove the time, date_last_seen=date. Also for the time zone , should I use gmdate or just use date.

plugins/UsersManager/API.php Outdated Show resolved Hide resolved
plugins/UsersManager/API.php Outdated Show resolved Hide resolved
peterhashair and others added 2 commits September 26, 2021 21:52
Co-authored-by: Stefan Giehl <stefan@matomo.org>
update api field date_last_seen to last_seen, fixed some code format, change gdate to date
@peterhashair peterhashair modified the milestones: 4.5.0, 4.6.0 Sep 27, 2021
update date to Piwik date function
@sgiehl sgiehl merged commit 337a266 into 4.x-dev Sep 27, 2021
@sgiehl sgiehl deleted the m-10550-api-user-lastseen-field branch September 27, 2021 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add field lastSeen in the API for the UsersManager
2 participants