Skip to content
Snippets Groups Projects
Commit b86e124e authored by Christopher Schäpers's avatar Christopher Schäpers
Browse files

Warn user on resetting passwords via occ when encryption is enabled

parent 79fa2bc3
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,16 @@ class ResetPassword extends Command {
if ($input->isInteractive()) {
/** @var $dialog \Symfony\Component\Console\Helper\DialogHelper */
$dialog = $this->getHelperSet()->get('dialog');
if (\OCP\App::isEnabled('files_encryption')) {
$output->writeln(
'<error>Warning: Resetting the password when using encryption will result in data loss!</error>'
);
if (!$dialog->askConfirmation($output, '<question>Do you want to continue?</question>', true)) {
return 1;
}
}
$password = $dialog->askHiddenResponse(
$output,
'<question>Enter a new password: </question>',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment