Skip to content

Conversation

@solracsf
Copy link
Member

@solracsf solracsf commented Dec 18, 2025

Summary

Updated the limit option to allow --limit=0 for unlimited users listing.

This PR simply passes null to underlying methods since IUserManager::searchDisplayName() and IUserManager::getDisabledUsers() accept null for the limit parameter.

Checklist

@solracsf solracsf added this to the Nextcloud 33 milestone Dec 18, 2025
@solracsf solracsf requested a review from a team as a code owner December 18, 2025 12:50
@solracsf solracsf requested review from Altahrim, come-nc, salmart-dev and yemkareems and removed request for a team December 18, 2025 12:50
@solracsf solracsf changed the title enh(userList): Allow to list all users feat(userList): Allow to list all users Dec 18, 2025
Copy link
Contributor

@kesselb kesselb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

Copy link
Contributor

@miaulalala miaulalala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the highest amount of users you've tested this with? I'm a bit worried about running out of memory - I think it would be wise to chunk the output to something like 500 or 1000 users per call to writeArrayInOutputFormat

@come-nc
Copy link
Contributor

come-nc commented Dec 18, 2025

@miaulalala You would still have all users in memory, no?
The issue is that the offset in userManager cannot really be used, because depending on the backend it’s really bad (for LDAP for instance).

@solracsf
Copy link
Member Author

solracsf commented Dec 18, 2025

What's the highest amount of users you've tested this with?

11.768 in a public instance (using LDAP).

@miaulalala miaulalala self-requested a review December 18, 2025 16:02
@solracsf
Copy link
Member Author

Also please note that this PR is not different from something like occ user:list --limit=99999999 so the user can already list all users. This PR just simplifies and documents the process :)

@solracsf solracsf merged commit 60cb5a3 into master Dec 20, 2025
218 of 233 checks passed
@solracsf solracsf deleted the allowListAllUsers branch December 20, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use --limit 0 to disable user:list limit

5 participants