114
* @return Response
* @Config\Route("/users/{user}/remove", name = "site_users_remove")
* @Config\ParamConverter("user", options = {"mapping": {"user": "id"}})
*/
public function removeAction(User $user)
{
$user->setDeleted(true);
$this->manager->persist($user);
$this->manager->flush();
return $this->redirectToRoute('site_users_index');
}
}
<?php namespace AppBundle\Controller;
use AppBundle\Form\Type\LoginFormType;
use AppBundle\Form\Type\ProfileFormType;
use AppBundle\Controller\InitializableController;
use AppBundle\Entity\Role; use AppBundle\Entity\User;
use Sensio\Bundle\FrameworkExtraBundle\Configuration as Config;
use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoder;
use Symfony\Component\Security\Core\Security; class SecurityController extends
InitializableController {
/**
* @return RedirectResponse|Response
* @Config\Route("/login", name = "site_security_login")
*/
public function loginAction()