getCode(); } /** * get number of received unconfirmed connections (friend requests) * @param $sConnectionsObject connections object to get unconfirmed connections from * @param $mixedId id to get connections for, if omitted then logged-in profile id is used * @return number */ public function serviceGetUnconfirmedConnectionsNum ($sConnectionsObject, $mixedId = 0) { $oConnection = BxDolConnection::getObjectInstance($sConnectionsObject); if (!$oConnection) return 0; if (!$mixedId) $mixedId = bx_get_logged_profile_id(); $i = 0; $a = $oConnection->getConnectedInitiators($mixedId, 0); // get received friend requests foreach ($a as $iId) if (BxDolProfile::getInstance($iId)) ++$i; return $i; } } /** @} */