From 09f9399ff3269606023c1b6eab773ebff2d6f96e Mon Sep 17 00:00:00 2001 From: romanlesnikov Date: Fri, 29 Nov 2024 09:46:08 +0200 Subject: [PATCH] #4558 - Build-in API support (fix counters) --- inc/classes/BxDolProfile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/classes/BxDolProfile.php b/inc/classes/BxDolProfile.php index 21110c0c19..a95da91975 100644 --- a/inc/classes/BxDolProfile.php +++ b/inc/classes/BxDolProfile.php @@ -182,7 +182,6 @@ public static function getDataForPage($mixedProfileId = false, $aParams = []) 'operator' => isAdmin(), //'info' => $oProfile->getInfo(), 'confirmed' => $oAccount->isConfirmed(), - 'counters' => bx_srv('system', 'profile_counters', [], 'TemplServiceProfiles'), 'profiles_count' => $oAccount->getProfilesNumber(true), 'hash' => encryptUserId($iId), 'profiles_limit' => (int)getParam('sys_account_limit_profiles_number'), @@ -191,6 +190,8 @@ public static function getDataForPage($mixedProfileId = false, $aParams = []) ]; if ($iId == bx_get_logged_profile_id()){ + $aRv['counters'] = bx_srv('system', 'profile_counters', [], 'TemplServiceProfiles'); + $oInformer = BxDolInformer::getInstance(BxDolTemplate::getInstance()); $sRet = $oInformer ? $oInformer->display() : ''; if ($sRet){