|
@@ -18,6 +18,7 @@ use App\Entity\User;
|
|
|
use App\Form\ProfileType;
|
|
|
use App\Repository\UserRepository;
|
|
|
use Doctrine\ORM\EntityManagerInterface;
|
|
|
+use Symfony\Component\Form\FormFactoryInterface;
|
|
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
|
|
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
@@ -120,9 +121,9 @@ class SecurityController extends AbstractController
|
|
|
/**
|
|
|
* @Route("/admin/deluser/{id}", name="admin_deluser")
|
|
|
*/
|
|
|
- public function delUserAction (Request $request, User $user, UserManager $userManager)
|
|
|
+ public function delUserAction (Request $request, User $user, UserManager $userManager, FormFactoryInterface $ffi)
|
|
|
{
|
|
|
- $form = $this->get('form.factory')->create();
|
|
|
+ $form = $ffi->create();
|
|
|
$form->handleRequest($request);
|
|
|
if ($form->isSubmitted() && $form->isValid()) {
|
|
|
$userManager->removeUser($user);
|