Permalink
Browse files

Fixed commands

  • Loading branch information...
1 parent ffe6ef5 commit 358242d4476228ad374e5742b3f85a2a52d25823 @stof stof committed Mar 11, 2011
View
2 Command/ActivateUserCommand.php
@@ -54,7 +54,7 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, array(User::ROLE_SUPERADMIN)));
+ $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, $this->container->getParameter('fos_user.provider_key'), array(User::ROLE_SUPERADMIN)));
$userManager = $this->container->get('fos_user.user_manager');
$user = $userManager->findUserByUsername($input->getArgument('username'));
View
2 Command/ChangePasswordCommand.php
@@ -46,7 +46,7 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, array(User::ROLE_SUPERADMIN)));
+ $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, $this->container->getParameter('fos_user.provider_key'), array(User::ROLE_SUPERADMIN)));
$userManager = $this->container->get('fos_user.user_manager');
$user = $userManager->findUserByUsername($input->getArgument('username'));
View
2 Command/CreateUserCommand.php
@@ -80,7 +80,7 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, array(User::ROLE_SUPERADMIN)));
+ $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, $this->container->getParameter('fos_user.provider_key'), array(User::ROLE_SUPERADMIN)));
$userManager = $this->container->get('fos_user.user_manager');
$user = $userManager->createUser();
View
2 Command/DeactivateUserCommand.php
@@ -54,7 +54,7 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, array(User::ROLE_SUPERADMIN)));
+ $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, $this->container->getParameter('fos_user.provider_key'), array(User::ROLE_SUPERADMIN)));
$userManager = $this->container->get('fos_user.user_manager');
$user = $userManager->findUserByUsername($input->getArgument('username'));
View
2 Command/DemoteSuperAdminCommand.php
@@ -54,7 +54,7 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, array(User::ROLE_SUPERADMIN)));
+ $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, $this->container->getParameter('fos_user.provider_key'), array(User::ROLE_SUPERADMIN)));
$userManager = $this->container->get('fos_user.user_manager');
$user = $userManager->findUserByUsername($input->getArgument('username'));
View
2 Command/PromoteSuperAdminCommand.php
@@ -55,7 +55,7 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, array(User::ROLE_SUPERADMIN)));
+ $this->container->get('security.context')->setToken(new UsernamePasswordToken('command.line', null, $this->container->getParameter('fos_user.provider_key'), array(User::ROLE_SUPERADMIN)));
$userManager = $this->container->get('fos_user.user_manager');
$user = $userManager->findUserByUsername($input->getArgument('username'));

0 comments on commit 358242d

Please sign in to comment.