Explorar o código

#4558 - Build-in API support (profile info)

romanlesnikov hai 1 ano
pai
achega
ab3738a512

+ 8 - 0
template/scripts/BxBaseServiceProfiles.php

@@ -1196,6 +1196,14 @@ class BxBaseServiceProfiles extends BxDol
         if(bx_is_api() && ($oLiveUpdates = BxDolLiveUpdates::getInstance()) !== false)
             return $oLiveUpdates->performApi();
     }
+    
+    public function serviceProfileInfo()
+    {
+        if (isLogged()) {
+            $o = BxDolProfile::getInstance();
+            return BxDolProfile::getDataForPage($o);
+        }
+    }
 
     public function serviceUpdateSettings($iProfileId = false, $sSettings = '')
     {

+ 1 - 0
template/scripts/BxBaseServices.php

@@ -92,6 +92,7 @@ class BxBaseServices extends BxDol implements iBxDolProfileService
             'UpdateSettings' => 'BxBaseServiceProfiles',
             'Befriend' => 'BxBaseServiceProfiles',
             'ProfileCounters' => 'BxBaseServiceProfiles',
+            'ProfileInfo' => 'BxBaseServiceProfiles',
             
             'GetChartGrowth' => 'BxBaseChartServices',
             'GetChartStats' => 'BxBaseChartServices',