*/
public function putUserAction(Request $request)
{
- if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) {
+ 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');
return (new JsonResponse())
$view->setFormat('json');
// handle errors in a more beautiful way than the default view
- $data = json_decode($this->handleView($view)->getContent(), true)['children'];
+ $data = json_decode($this->handleView($view)->getContent(), true)['errors']['children'];
$errors = [];
if (isset($data['username']['errors'])) {
/**
* Send user response.
*
- * @param User $user
* @param string $group Used to define with serialized group might be used
* @param int $status HTTP Status code to send
*