N98\Magento\Command\Admin\User\ListCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->detectMagento($output, true);
        if (!$this->initMagento()) {
            return;
        }
        /** @var $userModel \Mage_Admin_Model_User  */
        $userModel = $this->getUserModel();
        $userList = $userModel->getCollection();
        $table = array();
        foreach ($userList as $user) {
            $table[] = array($user->getId(), $user->getUsername(), $user->getEmail(), $user->getIsActive() ? 'active' : 'inactive');
        }
        $this->getHelper('table')->setHeaders(array('id', 'username', 'email', 'status'))->renderByFormat($output, $table, $input->getOption('format'));
    }