/** * Constructor * * @param string $a_xml_file xml file * @param int $a_mode IL_EXTRACT_ROLES | IL_USER_IMPORT | IL_VERIFY * @param int $a_conflict_rue IL_FAIL_ON_CONFLICT | IL_UPDATE_ON_CONFLICT | IL_IGNORE_ON_CONFLICT * * @access public */ function ilUserImportParser($a_xml_file = '', $a_mode = IL_USER_IMPORT, $a_conflict_rule = IL_FAIL_ON_CONFLICT) { global $lng, $tree, $ilias, $ilUser, $styleDefinition; $this->roles = array(); $this->mode = $a_mode; $this->conflict_rule = $a_conflict_rule; $this->error_level = IL_IMPORT_SUCCESS; $this->protocol = array(); $this->logins = array(); $this->userCount = 0; $this->localRoleCache = array(); $this->parentRolesCache = array(); $this->ilincdata = array(); $this->send_mail = false; $this->mapping_mode = IL_USER_MAPPING_LOGIN; // get all active style instead of only assigned ones -> cannot transfer all to another otherwise $this->userStyles = array(); include_once "./Services/Style/classes/class.ilObjStyleSettings.php"; include_once './Services/Style/classes/class.ilStyleDefinition.php'; $templates = ilStyleDefinition::_getAllTemplates(); if (is_array($templates)) { foreach ($templates as $template) { // get styles information of template $styleDef =& new ilStyleDefinition($template["id"]); $styleDef->startParsing(); $styles = $styleDef->getStyles(); foreach ($styles as $style) { if (!ilObjStyleSettings::_lookupActivatedStyle($template["id"], $style["id"])) { continue; } $this->userStyles[] = $template["id"] . ":" . $style["id"]; } } } $settings = $ilias->getAllSettings(); if ($settings["usr_settings_hide_skin_style"] == 1) { $this->hideSkin = TRUE; } else { $this->hideSkin = FALSE; } if ($settings["usr_settings_disable_skin_style"] == 1) { $this->disableSkin = TRUE; } else { $this->disableSkin = FALSE; } include_once "Services/Mail/classes/class.ilAccountMail.php"; $this->acc_mail = new ilAccountMail(); $this->acc_mail->useLangVariablesAsFallback(true); parent::ilSaxParser($a_xml_file); }