public function putAction(Request $request, $id)
    {
        try {
            $this->checkArguments($request);
            $locale = $this->getRequestParameter($request, 'locale', true);
            $user = $this->getUserManager()->save($request->request->all(), $locale, $id);
            $view = $this->view($user, 200);
        } catch (EntityNotFoundException $exc) {
            $view = $this->view($exc->toArray(), 404);
        } catch (UsernameNotUniqueException $exc) {
            $view = $this->view($exc->toArray(), 409);
        } catch (EmailNotUniqueException $exc) {
            $view = $this->view($exc->toArray(), 409);
        } catch (RestException $exc) {
            $view = $this->view($exc->toArray(), 400);
        }

        $this->addSerializationGroups($view);

        return $this->handleView($view);
    }
public function putAction(Request $request, $id)
    {
        try {
            $this->checkArguments($request);
            $locale = $this->getRequestParameter($request, 'locale', true);
            $user = $this->getUserManager()->save($request->request->all(), $locale, $id);
            $view = $this->view($user, 200);
        } catch (EntityNotFoundException $exc) {
            $view = $this->view($exc->toArray(), 404);
        } catch (UsernameNotUniqueException $exc) {
            $view = $this->view($exc->toArray(), 409);
        } catch (EmailNotUniqueException $exc) {
            $view = $this->view($exc->toArray(), 409);
        } catch (RestException $exc) {
            $view = $this->view($exc->toArray(), 400);
        }

        $this->addSerializationGroups($view);

        return $this->handleView($view);
    }
public function putAction ( Request $ request , $ id ) { try { $ this -> checkArguments ( $ request ) ; $ locale = $ this -> getRequestParameter ( $ request , 'locale' , true ) ; $ user = $ this -> getUserManager ( ) -> save ( $ request -> request -> all ( ) , $ locale , $ id ) ; $ view = $ this -> view ( $ user , 200 ) ; } catch ( EntityNotFoundException $ exc ) { $ view = $ this -> view ( $ exc -> toArray ( ) , 404 ) ; } catch ( UsernameNotUniqueException $ exc ) { $ view = $ this -> view ( $ exc -> toArray ( ) , 409 ) ; } catch ( EmailNotUniqueException $ exc ) { $ view = $ this -> view ( $ exc -> toArray ( ) , 409 ) ; } catch ( RestException $ exc ) { $ view = $ this -> view ( $ exc -> toArray ( ) , 400 ) ; } $ this -> addSerializationGroups ( $ view ) ; return $ this -> handleView ( $ view ) ; }
Updates the given user with the given data.

@param \Symfony\Component\HttpFoundation\Request $request
@param int $id

@return \Symfony\Component\HttpFoundation\Response
Updates the given user with the given data .