Skip to content

fix: #58828 occ group:list -i displays user's name too#58829

Open
smarinier wants to merge 2 commits intonextcloud:masterfrom
smarinier:fix/58828/occ_group_list_display_user_name
Open

fix: #58828 occ group:list -i displays user's name too#58829
smarinier wants to merge 2 commits intonextcloud:masterfrom
smarinier:fix/58828/occ_group_list_display_user_name

Conversation

@smarinier
Copy link
Copy Markdown

Summary

occ group:list displays uids only. That is useless with generated uids (sso).
Using -i allow to have user's name too on list print

TODO

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Sebastien Marinier <seb@smarinier.net>
@smarinier smarinier requested a review from a team as a code owner March 10, 2026 11:58
@smarinier smarinier requested review from ArtificialOwl, icewind1991, leftybournes and sorbaugh and removed request for a team March 10, 2026 11:58
Comment on lines +74 to +76
return array_map(function ($userId) use ($addInfo) {
$user = $addInfo ? $this->userManager->get($userId) : null;
return (string)$userId . ($user ? ': ' . $user->getDisplayName() : '');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return array_map(function ($userId) use ($addInfo) {
$user = $addInfo ? $this->userManager->get($userId) : null;
return (string)$userId . ($user ? ': ' . $user->getDisplayName() : '');
$users = $group->getUsers();
return array_map(function (IUser $user) use ($addInfo): string {
return $user->getUID() . ($addInfo ? ': ' . $user->getDisplayName() : '');

Should be a lot more efficient

Signed-off-by: Sebastien Marinier <seb@smarinier.net>
@github-actions
Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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.

Display user name with occ group:list

2 participants