public function saveAction(Request $request)
    {
        $portlets = $request->request->get('portlets');
        $portlets = json_decode($portlets, true);

        if (!is_array($portlets)) {
            return new ResultResponse(false, 'Portlets data invalid.');
        }

        $user = $this->getUser();
        $user->setProperty('portlets', json_encode($portlets));

        $this->get('phlexible_user.user_manager')->updateUser($user);

        return new ResultResponse(true, 'Portlets saved.');
    }