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

[feature request] Add ability to show all user's "last seen" date and time on CLI with occ #39048

Closed
nooblag opened this issue Jun 28, 2023 · 4 comments · Fixed by #39669
Closed

Comments

@nooblag
Copy link
Contributor

nooblag commented Jun 28, 2023

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
A specific user's last seen date and time can be found with sudo -u www-data php /var/www/nextcloud/occ user:lastseen <uid> but there is no capability to return this information for all users.

Describe the solution you'd like
Perhaps all --all switch for the occ command, to return list of all user's last seen date and time?

Describe alternatives you've considered
Have considered shell scripts discussed on this forum thread, but they're cumbersome.

Additional context
Add any other context or screenshots about the feature request here.

Screenshot from 2023-06-29 07-44-06

@nooblag nooblag added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jun 28, 2023
@nooblag nooblag changed the title [feature request] Add ability to show all user's "last seen" date and time in web interface, and also CLI with occ [feature request] Add ability to show all user's "last seen" date and time on CLI with occ Jun 28, 2023
@isdnfan
Copy link

isdnfan commented Jun 29, 2023

existing occ user:list command with little postprocessing provides exactly such report
occ user:list --output=json --info| jq '.[] |{(.user_id): .last_seen}'

https://help.nextcloud.com/t/email-alerts-for-non-logged-users-more-than-30-days/157945/3

@nooblag
Copy link
Contributor Author

nooblag commented Jun 29, 2023

Thanks, and sure, can do postprocessing (after installing jq by-the-way) or fiddle around with bash scripts to do iterating, but none of this is an ask for that.

I'm more asking for an --all switch (like other occ commands), to save all this mucking around 😃

@joshtrichards
Copy link
Member

Given occ is already a command line tool... doing a little additional "mucking around" using broadly accepted tools (like jq) would seem the solution.

I doubt this Issue will get any traction if you wait for someone else to implement it - since there is a perfectly reasonable solution/alternative and there are "a million" other items (that don't have alternatives) that will always take core developer priority. :-)

Both the json output support and jq were basically made for this sort of use case.

You're welcome to to implement a built-in --all parameter, however, if it's that important to you. Feel free to do so and submit a PR. :-)

@nooblag
Copy link
Contributor Author

nooblag commented Aug 2, 2023

Okay cool, here's a PR for it.

@joshtrichards joshtrichards added feature: occ 2. developing Work in progress and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants