diff --git a/core/Command/User/ResetPassword.php b/core/Command/User/ResetPassword.php index c1759533d3996..7fc789364bd55 100644 --- a/core/Command/User/ResetPassword.php +++ b/core/Command/User/ResetPassword.php @@ -43,6 +43,12 @@ protected function configure() { InputOption::VALUE_NONE, 'read password from environment variable NC_PASS/OC_PASS' ) + ->addOption( + 'no-password', + null, + InputOption::VALUE_NONE, + 'Sets the password to blank' + ) ; } @@ -61,6 +67,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln('--password-from-env given, but NC_PASS/OC_PASS is empty!'); return 1; } + } elseif ($input->getOption('no-password')) { + $password = ''; } elseif ($input->isInteractive()) { /** @var QuestionHelper $helper */ $helper = $this->getHelper('question');