From b91311db51dffab582111b6018c53ec92c2f80de Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Fri, 1 Aug 2025 20:24:37 -0400 Subject: [PATCH] Additional commit for CFM-436 --- app/src/Command/ResetMfaCommand.php | 76 +++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 app/src/Command/ResetMfaCommand.php 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')); + } +}