protected function createAdminUser($admin, $output)
    {
        try {
            $this->reloadConfig();

            $userStore = Factory::getStore('User');
            $userService = new UserService($userStore);
            $userService->createUser($admin['name'], $admin['mail'], $admin['pass'], 1);

            $output->writeln('<info>'.Lang::get('user_created').'</info>');
        } catch (\Exception $ex) {
            $output->writeln('<error>'.Lang::get('failed_to_create').'</error>');
            $output->writeln('<error>' . $ex->getMessage() . '</error>');
        }
    }
protected function createAdminUser($admin, $output)
    {
        try {
            $this->reloadConfig();

            $userStore = Factory::getStore('User');
            $userService = new UserService($userStore);
            $userService->createUser($admin['name'], $admin['mail'], $admin['pass'], 1);

            $output->writeln('<info>'.Lang::get('user_created').'</info>');
        } catch (\Exception $ex) {
            $output->writeln('<error>'.Lang::get('failed_to_create').'</error>');
            $output->writeln('<error>' . $ex->getMessage() . '</error>');
        }
    }
protected function createAdminUser ( $ admin , $ output ) { try { $ this -> reloadConfig ( ) ; $ userStore = Factory :: getStore ( 'User' ) ; $ userService = new UserService ( $ userStore ) ; $ userService -> createUser ( $ admin [ 'name' ] , $ admin [ 'mail' ] , $ admin [ 'pass' ] , 1 ) ; $ output -> writeln ( '<info>' . Lang :: get ( 'user_created' ) . '</info>' ) ; } catch ( \ Exception $ ex ) { $ output -> writeln ( '<error>' . Lang :: get ( 'failed_to_create' ) . '</error>' ) ; $ output -> writeln ( '<error>' . $ ex -> getMessage ( ) . '</error>' ) ; } }
Create admin user using information loaded before.

@param array $admin
@param OutputInterface $output
Create admin user using information loaded before .