Exemplo n.º 1
0
 /**
  * @param User $user
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function deleteAction(User $user)
 {
     if (!$user) {
         throw $this->createNotFoundException('Unable to find User entity.');
     }
     $this->denyAccessUnlessGranted($user->getRoles(), null, 'Unable to access this page!');
     $userManager = $this->getUserManager();
     $userManager->remove($user, true);
     return $this->redirect($this->generateUrl('evry_user_index'));
 }