diff --git a/app/src/Command/ResetMfaCommand.php b/app/src/Command/ResetMfaCommand.php new file mode 100644 index 000000000..81fb90d52 --- /dev/null +++ b/app/src/Command/ResetMfaCommand.php @@ -0,0 +1,76 @@ +addOption('not', [ + 'short' => 'n', + 'boolean' => true, + 'help' => __d('command', 'opt.not') + ]); + + return $parser; + }*/ + + /** + * Execute the Database Command. + * + * @since COmanage Registry v5.2.0 + * @param Arguments $args Command Arguments + * @param ConsoleIo $io Console IO + * @throws RuntimeException + */ + + public function execute(Arguments $args, ConsoleIo $io) { + // This tool is intended for administrators who lock themselves out trying to enable MFA. + $CoSettings = TableRegistry::getTableLocator()->get('CoSettings'); + + $CoSettings->resetMfaIndicator(); + + $io->out(__d('command', 'mfa.reset.done')); + } +}