- Модуль: intranet
- Путь к файлу: ~/bitrix/modules/intranet/classes/general/cml2.php
- Класс: CUserCMLImport
- Вызов: CUserCMLImport::Init
function Init(&$next_step, $files_dir, $arParams = array())
{
$this->next_step = &$next_step;
$this->files_dir = $files_dir;
$this->arParams = $arParams;
//if (is_array($this->next_step['_TEMPORARY']['DEPARTMENTS']))
$this->arSectionCache = &$this->next_step['_TEMPORARY']['DEPARTMENTS'];
$this->DEPARTMENTS_IBLOCK_ID = $this->arParams['DEPARTMENTS_IBLOCK_ID'];
$this->ABSENCE_IBLOCK_ID = $this->arParams['ABSENCE_IBLOCK_ID'];
$this->STATE_HISTORY_IBLOCK_ID = $this->arParams['STATE_HISTORY_IBLOCK_ID'];
$dbRes = CIBlock::GetList(
array(),
array(
'TYPE' => $arParams['IBLOCK_TYPE'] ? $arParams['IBLOCK_TYPE'] : 'STRUCTURE',
'ID' => array($this->DEPARTMENTS_IBLOCK_ID, $this->ABSENCE_IBLOCK_ID, $this->STATE_HISTORY_IBLOCK_ID)
)
);
$bError = false;
if (intval($dbRes->SelectedRowsCount()) < 3)
{
$bError = true;
}
if ($bError)
{
$GLOBALS['APPLICATION']->ThrowException(GetMessage('IBLOCK_XML2_USER_ERROR_IBLOCK_MISSING'));
return false;
}
$def_group = COption::GetOptionString("main", "new_user_registration_def_group", "");
if($def_group != "")
$this->arUserGroups = explode(",", $def_group);
return true;
}