mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: added the interactive condition to the password question and in non-interactive mode sent the password directly
Signed-off-by: yemkareems <yemkareems@gmail.com>
This commit is contained in:
parent
93c3079637
commit
d420b3f157
1 changed files with 6 additions and 2 deletions
|
|
@ -278,8 +278,12 @@ class EncryptAll {
|
|||
$this->writePasswordsToFile($newPasswords);
|
||||
|
||||
$this->output->writeln('');
|
||||
$question = new ConfirmationQuestion('Do you want to send the passwords directly to the users by mail? (y/n) ', false);
|
||||
if ($this->questionHelper->ask($this->input, $this->output, $question)) {
|
||||
if ($this->input->isInteractive()) {
|
||||
$question = new ConfirmationQuestion('Do you want to send the passwords directly to the users by mail? (y/n) ', false);
|
||||
if ($this->questionHelper->ask($this->input, $this->output, $question)) {
|
||||
$this->sendPasswordsByMail();
|
||||
}
|
||||
} elseif (!$this->input->isInteractive() && $this->input->getOption('no-interaction')) {
|
||||
$this->sendPasswordsByMail();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue