Comment to 'How to get gender,birthday,location from persons data?'
  • ok, i finally did it!

        $oProfile = BxDolProfile::getInstance($iProfileId);
        $aProfileInfo = $oProfile->getInfo();
        $sViewerModule = $oProfile->getModule();
        
        
        $aSegViewer = [];
    
                $aViewerInfo = bx_srv($sViewerModule, 'get_info', [$oProfile->getContentId(), false]);
                
                if(!empty($aViewerInfo) && is_array($aViewerInfo)) {
                    if(!empty($aViewerInfo['gender']))
                        $aSegViewer['gender'] = $aViewerInfo['gender'];
    
                    if(!empty($aViewerInfo['birthday']))
                        $aSegViewer['age'] = bx_birthday2age($aViewerInfo['birthday']);
    
                    if(!empty($aViewerInfo['location'])) {
                        $aLocation = unserialize($aViewerInfo['location']);
                        if(!empty($aLocation['country']))
                            $aSegViewer['country'] = $aLocation['country'];
                    }
    
                    if(!empty($aViewerInfo['tags']))
                        $aSegViewer['tags'] = explode(',', $aViewerInfo['tags']);
                }
           
        echo $aSegViewer['gender'];echo $aSegViewer['age'];echo $aSegViewer['country'];