UserController.php 655B

123456789101112131415161718192021222324252627
  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. }