public function get($request, $match)
    {
        $userId = $match['userId'];
//         $user = Pluf_Shortcuts_GetObjectOr404('User', $userId);
//         try {
//             $profile = $user->getProfile();
//         } catch (Pluf_Exception_DoesNotExist $ex) {
//             $profile = new $profile_model();
//             $profile->user = $user;
//             $profile->create();
//         }
//         return new Pluf_HTTP_Response_Json($profile);
        $profileDoc = User_Views_CProfile::get_profile_document($userId);
        $docMap = User_Views_CProfile::getDocumentMap($profileDoc);
        $docMap['user'] = $userId;
        return new Pluf_HTTP_Response_Json($docMap);
    }
public function get($request, $match)
    {
        $userId = $match['userId'];
//         $user = Pluf_Shortcuts_GetObjectOr404('User', $userId);
//         try {
//             $profile = $user->getProfile();
//         } catch (Pluf_Exception_DoesNotExist $ex) {
//             $profile = new $profile_model();
//             $profile->user = $user;
//             $profile->create();
//         }
//         return new Pluf_HTTP_Response_Json($profile);
        $profileDoc = User_Views_CProfile::get_profile_document($userId);
        $docMap = User_Views_CProfile::getDocumentMap($profileDoc);
        $docMap['user'] = $userId;
        return new Pluf_HTTP_Response_Json($docMap);
    }
public function get ( $ request , $ match ) { $ userId = $ match [ 'userId' ] ; //         $user = Pluf_Shortcuts_GetObjectOr404('User', $userId); //         try { //             $profile = $user->getProfile(); //         } catch (Pluf_Exception_DoesNotExist $ex) { //             $profile = new $profile_model(); //             $profile->user = $user; //             $profile->create(); //         } //         return new Pluf_HTTP_Response_Json($profile); $ profileDoc = User_Views_CProfile :: get_profile_document ( $ userId ) ; $ docMap = User_Views_CProfile :: getDocumentMap ( $ profileDoc ) ; $ docMap [ 'user' ] = $ userId ; return new Pluf_HTTP_Response_Json ( $ docMap ) ; }
Returns profile information of specified user.
Data model of profile can be different in each system. Also loading information of user is lazy,
so profile is not loaded until a request occure.

@param Pluf_HTTP_Request $request
@param array $match
Returns profile information of specified user . Data model of profile can be different in each system . Also loading information of user is lazy so profile is not loaded until a request occure .