diff --git a/Command/ChangePasswordCommand.php b/Command/ChangePasswordCommand.php index 130a01e6f4..6cb84d785c 100644 --- a/Command/ChangePasswordCommand.php +++ b/Command/ChangePasswordCommand.php @@ -83,7 +83,8 @@ function($username) { } if (!$input->getArgument('password')) { - $password = $this->getHelper('dialog')->askAndValidate( + $askingMethod = method_exists($this->getHelper('dialog'), 'askHiddenResponseAndValidate') ? 'askHiddenResponseAndValidate' : 'askAndValidate'; + $password = $this->getHelper('dialog')->$askingMethod( $output, 'Please enter the new password:', function($password) { diff --git a/Command/CreateUserCommand.php b/Command/CreateUserCommand.php index 16814f0f0f..01492a3508 100644 --- a/Command/CreateUserCommand.php +++ b/Command/CreateUserCommand.php @@ -115,7 +115,8 @@ function($email) { } if (!$input->getArgument('password')) { - $password = $this->getHelper('dialog')->askAndValidate( + $askingMethod = method_exists($this->getHelper('dialog'), 'askHiddenResponseAndValidate') ? 'askHiddenResponseAndValidate' : 'askAndValidate'; + $password = $this->getHelper('dialog')->$askingMethod( $output, 'Please choose a password:', function($password) {