28 lines
655B

  1. <?php
  2. namespace Lc\ShopBundle\Controller\Admin;
  3. use FOS\UserBundle\Doctrine\UserManager;
  4. use FOS\UserBundle\Model\UserManagerInterface ;
  5. class UserController extends AdminController
  6. {
  7. public function createNewEntity()
  8. {
  9. return $this->userManager->createUser();
  10. }
  11. public function persistEntity($user)
  12. {
  13. $this->userManager->updateUser($user, false);
  14. parent::persistEntity($user);
  15. }
  16. public function updateEntity($user)
  17. {
  18. $this->userManager->updateUser($user, false);
  19. parent::updateEntity($user);
  20. }
  21. }