- if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) {
- $json = $this->get('serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json');
+ if (!$this->container->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) {
+ $json = $this->get('jms_serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json');