public static function get($request, $match)
    {
        if(isset($match['userId'])){        
            $user = Pluf_Shortcuts_GetObjectOr404('User_Account', $match['userId']);
        }else{
            $user = $request->user;
        }
        if (array_key_exists('profileId', $match)) {
            return Pluf_Shortcuts_GetObjectOr404('User_Profile', $match['profileId']);
        }
        $profile = self::getProfileOfUser($user);
        if($profile === null){
            $profile = new User_Profile();
            $profile->account_id = $user;
        }
        return $profile;
    }
public static function get($request, $match)
    {
        if(isset($match['userId'])){        
            $user = Pluf_Shortcuts_GetObjectOr404('User_Account', $match['userId']);
        }else{
            $user = $request->user;
        }
        if (array_key_exists('profileId', $match)) {
            return Pluf_Shortcuts_GetObjectOr404('User_Profile', $match['profileId']);
        }
        $profile = self::getProfileOfUser($user);
        if($profile === null){
            $profile = new User_Profile();
            $profile->account_id = $user;
        }
        return $profile;
    }
public static function get ( $ request , $ match ) { if ( isset ( $ match [ 'userId' ] ) ) { $ user = Pluf_Shortcuts_GetObjectOr404 ( 'User_Account' , $ match [ 'userId' ] ) ; } else { $ user = $ request -> user ; } if ( array_key_exists ( 'profileId' , $ match ) ) { return Pluf_Shortcuts_GetObjectOr404 ( 'User_Profile' , $ match [ 'profileId' ] ) ; } $ profile = self :: getProfileOfUser ( $ user ) ; if ( $ profile === null ) { $ profile = new User_Profile ( ) ; $ profile -> account_id = $ user ; } return $ profile ; }
Returns profile information of specified user.
In this server each account has at most one profile.

@param Pluf_HTTP_Request $request
@param array $match
Returns profile information of specified user . In this server each account has at most one profile .