本文整理汇总了PHP中CGroup::SetSubordinateGroups方法的典型用法代码示例。如果您正苦于以下问题:PHP CGroup::SetSubordinateGroups方法的具体用法?PHP CGroup::SetSubordinateGroups怎么用?PHP CGroup::SetSubordinateGroups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroup
的用法示例。
在下文中一共展示了CGroup::SetSubordinateGroups方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Array
COption::SetOptionString($module_id, "GROUP_DEFAULT_TASK", $GROUP_DEFAULT_TASK, "Task for groups by default");
$letter = ($l = CTask::GetLetter($GROUP_DEFAULT_TASK)) ? $l : 'D';
COption::SetOptionString($module_id, "GROUP_DEFAULT_RIGHT", $letter, "Right for groups by default");
$nID = COperation::GetIDByName('edit_subordinate_users');
$arTasksInModule = Array();
foreach($arGROUPS as $value)
{
$tid = ${"TASKS_".$value["ID"]};
$arTasksInModule[$value["ID"]] = Array('ID' => $tid);
$subOrdGr = false;
if (strlen($tid) > 0 && in_array($nID,CTask::GetOperations($tid)) && isset($_POST['subordinate_groups_'.$value["ID"]]))
$subOrdGr = $_POST['subordinate_groups_'.$value["ID"]];
CGroup::SetSubordinateGroups($value["ID"], $subOrdGr);
$rt = ($tid) ? CTask::GetLetter($tid) : '';
if (strlen($rt) > 0 && $rt != "NOT_REF")
$APPLICATION->SetGroupRight($module_id, $value["ID"], $rt);
else
$APPLICATION->DelGroupRight($module_id, array($value["ID"]));
}
CGroup::SetTasksForModule($module_id, $arTasksInModule);
if($_REQUEST["back_url_settings"] <> "" && $_REQUEST["Apply"] == "")
LocalRedirect($_REQUEST["back_url_settings"]);
else
LocalRedirect("/freetrix/admin/settings.php?lang=".LANGUAGE_ID."&mid=".urlencode($mid)."&tabControl_active_tab=".urlencode($_REQUEST["tabControl_active_tab"])."&back_url_settings=".urlencode($_REQUEST["back_url_settings"]));
}
示例2: RestoreSecurity
function RestoreSecurity($arExcludeGroups = array())
{
$arBackup = CControllerClient::GetBackup();
if (!is_array($arBackup)) {
return true;
}
if (is_array($arBackup["security"])) {
foreach ($arBackup["security"] as $group_code => $perms) {
if (in_array($group_code, $arExcludeGroups)) {
continue;
}
if (($group_id = CGroup::GetIDByCode($group_code)) > 0) {
foreach ($perms as $module_id => $level) {
CGroup::SetModulePermission($group_id, $module_id, $level);
}
if (isset($arBackup["security_subord_groups"][$group_code])) {
CGroup::SetSubordinateGroups($group_id, $arBackup["security_subord_groups"][$group_code]);
}
}
unset($arBackup["security"][$group_code]);
unset($arBackup["security_subord_groups"][$group_code]);
}
if (count($arBackup["security"]) <= 0) {
unset($arBackup["security"]);
}
CControllerClient::SetBackup($arBackup);
}
return true;
}
示例3: while
while ($arUsers = $rsUsers->Fetch()) {
$arGroups = CUser::GetUserGroup($arUsers["ID"]);
$arGroups[] = $groupID;
CUser::SetUserGroup($arUsers["ID"], $arGroups);
}
}
$dbResult = CGroup::GetList($by, $order, array("STRING_ID" => "PERSONNEL_DEPARTMENT", "STRING_ID_EXACT_MATCH" => "Y"));
if ($arExistsGroup = $dbResult->Fetch()) {
$groupID = $arExistsGroup["ID"];
$arSubordinateGroups = CGroup::GetSubordinateGroups($groupID);
$arSubordinateGroups[] = $SiteGroups["EMPLOYEES_" . WIZARD_SITE_ID];
$arSubordinateGroups[] = $SiteGroups["RATING_VOTE"];
$arSubordinateGroups[] = $SiteGroups["RATING_VOTE_AUTHORITY"];
CGroup::SetSubordinateGroups($groupID, $arSubordinateGroups);
}
CGroup::SetSubordinateGroups($SiteGroups["PORTAL_ADMINISTRATION_" . WIZARD_SITE_ID], array($SiteGroups["EMPLOYEES_" . WIZARD_SITE_ID]));
}
/*$allowGuests = COption::GetOptionString("main", "wizard_allow_group", "N", WIZARD_SITE_ID);
if($allowGuests == "Y")
{
$dbResult = CGroup::GetList($by, $order, Array("STRING_ID_EXACT_MATCH" => "Y"));
while ($arExistsGroup = $dbResult->Fetch())
{
if($arExistsGroup["ID"] != 1 && $arExistsGroup["ID"] !=2)
{
if(!in_array($arExistsGroup["STRING_ID"], $SiteGroup["STRING_ID"]))
{
$allowGuests = COption::GetOptionString("main", "wizard_allow_group", "N", $site_id);
WizardServices::SetFilePermission(Array(WIZARD_SITE_ID, WIZARD_SITE_DIR), Array($arExistsGroup["ID"] => "D"));
}
}
示例4: count
$handle_subord = false;
$l = count($arTaskIds);
for ($i = 0; $i < $l; $i++) {
if ($arTaskIds[$i]['ID'] == $arTasks['main']) {
$arOpInTask = CTask::GetOperations($arTaskIds[$i]['ID']);
if (in_array($nID, $arOpInTask) || in_array($nID2, $arOpInTask)) {
$handle_subord = true;
}
break;
}
}
if ($handle_subord) {
$arSubordinateGroups = isset($_POST['subordinate_groups']) ? $_POST['subordinate_groups'] : array();
CGroup::SetSubordinateGroups($ID, $arSubordinateGroups);
} else {
CGroup::SetSubordinateGroups($ID);
}
$old_arTasks = CGroup::GetTasks($ID, true);
if (count(array_diff($old_arTasks, $arTasks)) > 0 || count(array_diff($arTasks, $old_arTasks)) > 0) {
CGroup::SetTasks($ID, $arTasks);
}
}
if ($USER->CanDoOperation('edit_groups') && $_REQUEST["save"] != '') {
LocalRedirect("group_admin.php?lang=" . LANGUAGE_ID);
} elseif ($USER->CanDoOperation('edit_groups') && $_REQUEST["apply"] != '') {
LocalRedirect($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
} elseif ($new == "Y") {
LocalRedirect($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID . "&ID=" . $ID . "&" . $tabControl->ActiveTabParam());
}
}
}
示例5: unserialize
$arOptions = unserialize($sOptions);
WizardServices::SetUserOption('intranet', '~gadgets_mainpage_' . WIZARD_SITE_ID, $arOptions, $common = true);
$links = GetMessage('MAIN_OPT_DEF_LINKS');
//personal desktop, depending on SITE_ID
$sOptions = 'a:1:{s:7:"GADGETS";a:9:{s:13:"BIRTHDAY@8298";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:14:"HTML_AREA@8623";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:1;s:8:"USERDATA";a:1:{s:7:"content";s:1:" ";}s:4:"HIDE";s:1:"N";}s:13:"UPDATES@17676";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:11:"TASKS@11589";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:9:"BLOG@8601";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:2;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:15:"desktop-actions";a:3:{s:6:"COLUMN";i:2;s:3:"ROW";i:0;s:4:"HIDE";s:1:"N";}s:14:"CALENDAR@22972";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:13:"WEATHER@21928";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:2;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:12:"PROBKI@25675";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:3;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}}}';
$arOptions = unserialize($sOptions);
$arOptions['GADGETS']['HTML_AREA@8623']['USERDATA']['content'] = $links;
WizardServices::SetUserOption('intranet', '~gadgets_dashboard_' . WIZARD_SITE_ID, $arOptions, $common = true);
}
if (WIZARD_IS_RERUN) {
return;
}
$obSite = new CSite();
$obSite->Update(WIZARD_SITE_ID, array("NAME" => COption::GetOptionString("main", "site_name", GetMessage("DEFAULT_SITE_NAME"))));
CGroup::SetSubordinateGroups(WIZARD_PERSONNEL_DEPARTMENT_GROUP, array(WIZARD_EMPLOYEES_GROUP, WIZARD_RATING_VOTE_GROUP, WIZARD_RATING_VOTE_AUTHORITY_GROUP));
CGroup::SetSubordinateGroups(WIZARD_PORTAL_ADMINISTRATION_GROUP, array(WIZARD_EMPLOYEES_GROUP));
COption::SetOptionString("main", "server_name", $_SERVER["SERVER_NAME"]);
COption::SetOptionString("main", "upload_dir", "upload");
COption::SetOptionString("main", "component_cache_on", "Y");
COption::SetOptionString("main", "save_original_file_name", "Y");
COption::SetOptionString("main", "captcha_registration", "N");
COption::SetOptionString("main", "use_secure_password_cookies", "Y");
COption::SetOptionString("main", "new_user_email_uniq_check", "Y");
COption::SetOptionString("main", "auth_comp2", "Y");
COption::SetOptionString("main", "vendor", LANGUAGE_ID == "ru" ? "1c_bitrix_portal" : "bitrix_portal");
COption::SetOptionString("main", "PARAM_MAX_USERS", "25");
COption::SetOptionString("main", "update_autocheck", "7");
COption::SetOptionString("main", "use_digest_auth", "Y");
COption::SetOptionString("main", "use_time_zones", "Y");
COption::SetOptionString("main", "auto_time_zone", "Y");
COption::SetOptionString("main", "map_top_menu_type", "top");
示例6: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (WIZARD_IS_RERUN === true) {
return;
}
CGroup::SetSubordinateGroups(WIZARD_EXTRANET_ADMIN_GROUP, array(WIZARD_EXTRANET_GROUP));
SetMenuTypes(array("left" => GetMessage("MAIN_OPT_MENU_SECT"), "top" => GetMessage("MAIN_OPT_MENU_MAIN")), WIZARD_SITE_ID);
$sOptions = 'a:1:{s:7:"GADGETS";a:9:{s:8:"ADV@9058";a:4:{s:6:"COLUMN";i:0;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:23:"EXTRANET_CONTACTS@11468";a:5:{s:6:"COLUMN";i:0;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";s:8:"SETTINGS";a:2:{s:25:"MY_WORKGROUPS_USERS_COUNT";s:1:"5";s:18:"PUBLIC_USERS_COUNT";s:1:"5";}}s:15:"WORKGROUPS@2647";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:11:"TASKS@27413";a:4:{s:6:"COLUMN";i:1;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:13:"UPDATES@32753";a:5:{s:6:"COLUMN";i:1;s:3:"ROW";i:2;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";s:8:"SETTINGS";a:2:{s:11:"ENTITY_TYPE";s:1:"G";s:8:"EVENT_ID";s:0:"";}}s:14:"MESSAGES@24748";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:0;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:13:"PROFILE@20859";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:1;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:13:"TICKETS@11871";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:2;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}s:15:"RSSREADER@16757";a:4:{s:6:"COLUMN";i:2;s:3:"ROW";i:3;s:8:"USERDATA";N;s:4:"HIDE";s:1:"N";}}}';
$arOptions = unserialize($sOptions);
CExtranetWizardServices::SetUserOption('intranet', '~gadgets_dashboard_external', $arOptions, $common = true);
COption::SetOptionString("tasks", "paths_task_user", WIZARD_SITE_DIR . "contacts/personal/user/#user_id#/tasks/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_user_entry", WIZARD_SITE_DIR . "contacts/personal/user/#user_id#/tasks/task/view/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_user_edit", WIZARD_SITE_DIR . "contacts/personal/user/#user_id#/tasks/task/edit/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_user_action", WIZARD_SITE_DIR . "contacts/personal/user/#user_id#/tasks/task/#action#/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_group", WIZARD_SITE_DIR . "workgroups/group/#group_id#/tasks/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_group_entry", WIZARD_SITE_DIR . "workgroups/group/#group_id#/tasks/task/view/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_group_edit", WIZARD_SITE_DIR . "workgroups/group/#group_id#/tasks/task/edit/#task_id#/", false, WIZARD_SITE_ID);
COption::SetOptionString("tasks", "paths_task_group_action", WIZARD_SITE_DIR . "workgroups/group/#group_id#/tasks/task/#action#/#task_id#/", false, WIZARD_SITE_ID);
$arSites = array();
$arSitesID = array();
$rsSites = CSite::GetList($by = "sort", $order = "desc", array());
while ($arSite = $rsSites->Fetch()) {
$arSites[] = $arSite;
$arSitesID[] = $arSite["ID"];
}
COption::SetOptionString('calendar', 'pathes_for_sites', false);
COption::SetOptionString("calendar", 'pathes_sites', serialize($arSitesID));
foreach ($arSites as $arSite) {