protected function execute(InputInterface $input, OutputInterface $output)
{
$this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, array(User::ROLE_SUPERADMIN)));
$userManager = $this->container->get('fos_user.user_manager');
$user = $userManager->findUserByUsername($input->getArgument('username'));
if (!$user) {
throw new \InvalidArgumentException(sprintf('User identified by "%s" username does not exist.', $input->getArgument('username')));
}
$user->setPlainPassword($input->getArgument('password'));
$userManager->updateUser($user);
$output->writeln(sprintf('Changed password for user <comment>%s</comment>', $user->getUsername()));
}