Skip to content

Commit

Permalink
#4558 - Build-in API support (befriends)
Browse files Browse the repository at this point in the history
  • Loading branch information
romanlesnikov committed Nov 28, 2023
1 parent bab1b06 commit 138317a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions template/scripts/BxBaseServiceProfiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,14 @@ public function serviceProfileFollowings ($iProfileId = 0)
public function serviceBefriend ($iProfileId)
{
$oConnections = BxDolConnection::getObjectInstance('sys_profiles_friends');
$this->_oConnectionFriends->addConnection((int)bx_get_logged_profile_id(), $iProfileId);
$this->_oConnectionFriends->addConnection($iProfileId, (int)bx_get_logged_profile_id());
$oProfile = BxDolProfile::getInstance($iProfileId);
return $oProfile->getUnitAPI($iProfileId);

if ($oProfile && $oConnections){
$oConnections->addConnection((int)bx_get_logged_profile_id(), $iProfileId);
$oConnections->addConnection($iProfileId, (int)bx_get_logged_profile_id());
$oProfile = BxDolProfile::getInstance($iProfileId);
return BxDolProfile::getData($iProfileId);
}
}

public function serviceProfileStats ($iProfileId = 0)
Expand Down

0 comments on commit 138317a

Please sign in to comment.