• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/iblocksocnet.php
  • Класс: CIBlockWebdavSocnet
  • Вызов: CIBlockWebdavSocnet::OnSocNetGroupDelete
static function OnSocNetGroupDelete($groupId)
{
	$iblockIds = self::GetGroupIblock();

	foreach ($iblockIds as $iblockId)
	{
		$result = CIBlockWebdavSocnet::GetSectionID($iblockId, 'group', $groupId);
		if (intval($result) > 0)
		{
			if(!empty($groupId))
			{
				$dispatcher = new BitrixWebdavInviteDispatcher;
				$attachObjectType = CWebDavSymlinkHelper::ENTITY_TYPE_GROUP;
				$attachObjectId = (int)$groupId;

				$inviteComponentParams = array(
					'attachObject' => array(
						'id' => $attachObjectId,
						'type' => $attachObjectType,
					),
					'unshareUserIds' => array(), //all users
				);
				$response = $dispatcher->processActionUnshare($inviteComponentParams);
				if($response['status'] == $dispatcher::STATUS_SUCCESS)
				{

				}
			}

			CIBlockSection::Delete($result);
		}
	}

	CIBlockWebdavSocnet::ClearTagCache('wd_socnet');
}