您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

UserController.php 657B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Lc\ShopBundle\Controller\Backend;
  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. }