|
|
|
|
|
|
|
|
->setName('user:list') |
|
|
->setName('user:list') |
|
|
->setDescription('list configured users') |
|
|
->setDescription('list configured users') |
|
|
->addOption( |
|
|
->addOption( |
|
|
|
|
|
'disabled', |
|
|
|
|
|
'd', |
|
|
|
|
|
InputOption::VALUE_NONE, |
|
|
|
|
|
'List disabled users only' |
|
|
|
|
|
)->addOption( |
|
|
'limit', |
|
|
'limit', |
|
|
'l', |
|
|
'l', |
|
|
InputOption::VALUE_OPTIONAL, |
|
|
InputOption::VALUE_OPTIONAL, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output): int { |
|
|
protected function execute(InputInterface $input, OutputInterface $output): int { |
|
|
$users = $this->userManager->searchDisplayName('', (int) $input->getOption('limit'), (int) $input->getOption('offset')); |
|
|
|
|
|
|
|
|
if ($input->getOption('disabled')) { |
|
|
|
|
|
$users = $this->userManager->getDisabledUsers((int) $input->getOption('limit'), (int) $input->getOption('offset')); |
|
|
|
|
|
} else { |
|
|
|
|
|
$users = $this->userManager->searchDisplayName('', (int) $input->getOption('limit'), (int) $input->getOption('offset')); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$this->writeArrayInOutputFormat($input, $output, $this->formatUsers($users, (bool)$input->getOption('info'))); |
|
|
$this->writeArrayInOutputFormat($input, $output, $this->formatUsers($users, (bool)$input->getOption('info'))); |
|
|
return 0; |
|
|
return 0; |