本文整理汇总了PHP中CIntranetUtils::getUserDepartments方法的典型用法代码示例。如果您正苦于以下问题:PHP CIntranetUtils::getUserDepartments方法的具体用法?PHP CIntranetUtils::getUserDepartments怎么用?PHP CIntranetUtils::getUserDepartments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIntranetUtils
的用法示例。
在下文中一共展示了CIntranetUtils::getUserDepartments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$arParams["NAME_TEMPLATE"] = CSite::GetNameFormat();
}
$arSubDeps = CIntranetUtils::getSubordinateDepartments($USER->GetID(), true);
if ($arParams["GROUP_ID_FOR_SITE"] && CModule::IncludeModule("extranet") && CModule::IncludeModule("socialnetwork")) {
$arSites = array();
$rsGroupSite = CSocNetGroup::GetSite($arParams["GROUP_ID_FOR_SITE"]);
while ($arGroupSite = $rsGroupSite->Fetch()) {
$arSites[] = $arGroupSite["LID"];
}
$extranetSiteId = CExtranet::GetExtranetSiteID();
if ($extranetSiteId && in_array($extranetSiteId, $arSites)) {
$GLOBALS['GROUP_SITE_ID'] = $extranetSiteId;
}
}
$arManagers = array();
if (($arDepartments = CIntranetUtils::getUserDepartments($USER->GetID())) && is_array($arDepartments) && count($arDepartments) > 0) {
$arManagers = array_keys(CIntranetUserSelectorHelper::getDepartmentManagersId($arDepartments, $USER->getID(), true));
}
$iBlockId = COption::GetOptionInt('intranet', 'iblock_structure');
$arSecFilter = array('IBLOCK_ID' => $iBlockId);
if ($bSubordinateOnly) {
if (!$arSubDeps) {
$arSubDeps = array(-1);
}
$arSecFilter["ID"] = $arSubDeps;
}
$arStructure = $arSections = array();
if ($arParams["DISPLAY_TAB_STRUCTURE"] == 'Y' && (!CModule::IncludeModule('extranet') || CExtranet::IsIntranetUser())) {
$arStructure = CIntranetUtils::getSubStructure(0, 1);
$arSections = $arStructure['DATA'];
$arStructure = $arStructure['TREE'];