Ejemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $uid = $input->getArgument('uid');
     $user = $this->userManager->get($uid);
     if (is_null($user)) {
         $output->writeln("<error>Invalid UID</error>");
         return;
     }
     $this->manager->enableTwoFactorAuthentication($user);
     $output->writeln("Two-factor authentication enabled for user {$uid}");
 }