}
}
<?php
namespace AppBundle\Controller;
use AppBundle\Entity\Competition;
use AppBundle\Entity\Competitor;
use AppBundle\Entity\Status;
use AppBundle\Form\Type\UserFormType;
use AppBundle\Form\Type\UserFilterFormType;
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 UsersController extends InitializableController
{
/**
* @return RedirectResponse|Response
* @Config\Route("/users", name = "site_users_index")
*/
public function indexAction()
{
if (!($this->authChecker->isGranted(Role::TEACHER))) {