Skip to content

Commit

Permalink
cr remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
konradoboza committed Aug 27, 2024
1 parent ba23c09 commit fc94767
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/bundle/Command/UpdateUserCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ protected function configure(): void
$this->addArgument(
'user',
InputArgument::REQUIRED,
'User reference (id or login)',
'User login',
);
$this->addOption(
'password',
null,
InputOption::VALUE_NONE,
'New plaintext password (type will be in a "hidden" mode)',
'New plaintext password (input will be in a "hidden" mode)',
);
$this->addOption(
'email',
Expand Down Expand Up @@ -84,11 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return Command::SUCCESS;
}

if (is_numeric($userReference)) {
$user = $this->userService->loadUser((int)$userReference);
} else {
$user = $this->userService->loadUserByLogin($userReference);
}
$user = $this->userService->loadUserByLogin($userReference);

if ($enable && $disable) {
$io->error('--enable and --disable options cannot be used simultaneously.');
Expand All @@ -97,7 +93,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

if ($password) {
$password = $io->askHidden('Password (your type will be hidden)');
$password = $io->askHidden('Password (your input will be hidden)');
$input->setOption('password', $password);
}

Expand Down

0 comments on commit fc94767

Please sign in to comment.