Uh oh!
There was an error while loading. Please reload this page.
occ: Add --all support to user:lastseen - #39669
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
a7b8933 to
e26ecb4Compare
This comment was marked as resolved.
This comment was marked as resolved.
Uh oh!
There was an error while loading. Please reload this page.
Ooop, I spoke too soon. I see something has come up in the old code. I didn't change that. And I see that function in the rest of the user Should I add |
--all support to user:lastseenUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| } else { | ||
| $date = new \DateTime(); | ||
| $date->setTimestamp($lastLogin); | ||
| $output->writeln($user->getUID() . "'s last login: " . $date->format('Y-m-d H:i')); |
There was a problem hiding this comment.
I think the next feature request will be to be able to sort by last login, so maybe we should either sort, or do something like that so that it can be piped into sort:
| $output->writeln($user->getUID() . "'s last login: " . $date->format('Y-m-d H:i')); | |
| $output->writeln($date->format('Y-m-d H:i').' is the last login from '.$user->getUID()); |
There was a problem hiding this comment.
Okay, sure, if that change will align with future changes elsewhere. But for now, I didn't want to introduce breaking format change here. But happy for others to decide on how this should move forward.
come-nc
commented
Aug 28, 2023
You also need to run |
nooblag
commented
Aug 30, 2023
Sorry, could you please provide more info? I ran the code through the suggested linter in the development docs. Is that not correct? |
come-nc
commented
Aug 31, 2023
What linter are you talking about, can you share a link to this documentation? In the server repository there are helper scripts in the composer.json so that you can use You branch is failing the code style check in the CI: https://github.com/nextcloud/server/actions/runs/5746991359/job/15580158407 |
Thanks for getting back. I'm sorry, it's so long ago now, I can't find what linter I ran in my history. It was most likely But I've now followed the instructions here and ran the composer line and fixed, and will push with those last commits as discussed above. Thanks for your help. I hope that's better! |
come-nc
commented
Sep 7, 2023
Could you try to see if you manage to run the test locally with: And then fix either the code or the test? |
nooblag
commented
Sep 7, 2023
Running that returned this: |
come-nc
commented
Sep 7, 2023
@nooblag Are you missing php-sqlite3 maybe? |
Hi @come-nc Yes, I was missing I suspect the code needs to be changed in the test too, but I'm not really sure where to start. |
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Jordan Brown <code@jore.cc>
b5034c0 to
f2d4d9bComparenooblag
commented
Mar 14, 2024
Now with fixes, thank you @nickvergessen@come-nc, it'd be great if this makes it in time for NC 29. 😉 |
Signed-off-by: Joas Schilling <coding@schilljs.com>
f2d4d9b to
8134063Comparenickvergessen
commented
Mar 14, 2024
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
Great! :) I note the |
nickvergessen
commented
Mar 14, 2024
On https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#user-commands-label if could be added (search for |
Nice work. While we're in the space, just want to query if the times returned here will always be in UTC? And if so, whether we should be more explicit about that? Or, what do people think about ensuring the time is the same timezone as PHP set? For example, my locale set is Australia/Sydney, so times expected would be UTC+11 at the moment (and UTC+10 once daylight-saving is over). i.e. My CLI php.in setting: So either: Or: I also notice, if we do work to improve here, that changes for consistency should also apply to Should I open a new issue to tackle the |
nickvergessen
commented
Apr 3, 2024
Yes, please create a new issue |
nooblag
commented
Apr 3, 2024
Okay, thank you. Here it is for discussion: #44641. |
skjnldsv
commented
Mar 27, 2025
Docs done in nextcloud/documentation#11668 |

occ#39048Summary
Adds
--allargument touser:lastseenforocc.Checklist