public function setContainer(ContainerInterface $container = null)
    {
        parent::setContainer($container);

        if (!$this->container->getParameter('fom_user.reset_password')) {
            throw new AccessDeniedHttpException();
        }
    }
public function setContainer(ContainerInterface $container = null)
    {
        parent::setContainer($container);

        if (!$this->container->getParameter('fom_user.reset_password')) {
            throw new AccessDeniedHttpException();
        }
    }
public function setContainer ( ContainerInterface $ container = null ) { parent :: setContainer ( $ container ) ; if ( ! $ this -> container -> getParameter ( 'fom_user.reset_password' ) ) { throw new AccessDeniedHttpException ( ) ; } }
Check if password reset is allowed.

setContainer is called after controller creation is used to deny access to controller if password reset has
been disabled.
Check if password reset is allowed .