From b5852805347a265f85b995d6b858bc13bd73c4bf Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Thu, 18 Dec 2025 13:48:47 +0100 Subject: [PATCH] feat(userList): Allow to list all users Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- core/Command/User/ListCommand.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/Command/User/ListCommand.php b/core/Command/User/ListCommand.php index 66b831c793b3c..ec2d94e101afc 100644 --- a/core/Command/User/ListCommand.php +++ b/core/Command/User/ListCommand.php @@ -35,7 +35,7 @@ protected function configure() { 'limit', 'l', InputOption::VALUE_OPTIONAL, - 'Number of users to retrieve', + 'Number of users to retrieve (0 for unlimited)', '500' )->addOption( 'offset', @@ -58,10 +58,16 @@ protected function configure() { } protected function execute(InputInterface $input, OutputInterface $output): int { + $limit = (int)$input->getOption('limit'); + $offset = (int)$input->getOption('offset'); + + // Allow --limit 0 to mean unlimited + $actualLimit = ($limit === 0) ? null : $limit; + if ($input->getOption('disabled')) { - $users = $this->userManager->getDisabledUsers((int)$input->getOption('limit'), (int)$input->getOption('offset')); + $users = $this->userManager->getDisabledUsers($actualLimit, $offset); } else { - $users = $this->userManager->searchDisplayName('', (int)$input->getOption('limit'), (int)$input->getOption('offset')); + $users = $this->userManager->searchDisplayName('', $actualLimit, $offset); } $this->writeArrayInOutputFormat($input, $output, $this->formatUsers($users, (bool)$input->getOption('info')));