本文整理汇总了PHP中CSocNetGroup::CanUserInitiate方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocNetGroup::CanUserInitiate方法的具体用法?PHP CSocNetGroup::CanUserInitiate怎么用?PHP CSocNetGroup::CanUserInitiate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSocNetGroup
的用法示例。
在下文中一共展示了CSocNetGroup::CanUserInitiate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __GCEGetGroup
function __GCEGetGroup(&$group_id, &$arGroupProperties = array(), &$arGroupTmp = array(), $tab = false)
{
if (!CModule::IncludeModule("socialnetwork")) {
$group_id = 0;
return;
}
$arGroup = CSocNetGroup::GetByID($group_id);
if ($arGroup && ($tab == "edit" && ($arGroup["OWNER_ID"] == $GLOBALS["USER"]->GetID() || CSocNetUser::IsCurrentUserModuleAdmin()) || $tab == "invite" && (CSocNetUser::IsCurrentUserModuleAdmin() || CSocNetGroup::CanUserInitiate($GLOBALS["USER"]->GetID(), $group_id)))) {
$arGroupTmp["NAME"] = $arGroup["NAME"];
$arGroupTmp["DESCRIPTION"] = $arGroup["DESCRIPTION"];
$arGroupTmp["IMAGE_ID_DEL"] = "N";
$arGroupTmp["SUBJECT_ID"] = $arGroup["SUBJECT_ID"];
$arGroupTmp["VISIBLE"] = $arGroup["VISIBLE"];
$arGroupTmp["OPENED"] = $arGroup["OPENED"];
$arGroupTmp["CLOSED"] = $arGroup["CLOSED"];
$arGroupTmp["KEYWORDS"] = $arGroup["KEYWORDS"];
$arGroupTmp["OWNER_ID"] = $arGroup["OWNER_ID"];
$arGroupTmp["INITIATE_PERMS"] = $arGroup["INITIATE_PERMS"];
$arGroupTmp["SPAM_PERMS"] = $arGroup["SPAM_PERMS"];
$arGroupTmp["IMAGE_ID"] = $arGroup["IMAGE_ID"];
$arGroupTmp["IMAGE_ID_FILE"] = CFile::GetFileArray($arGroup["IMAGE_ID"]);
$arGroupTmp["IMAGE_ID_IMG"] = '<img src="' . ($arGroupTmp["IMAGE_ID_FILE"] != false ? $arGroupTmp["IMAGE_ID_FILE"]["SRC"] : "/bitrix/images/1.gif") . '" height="60" class="sonet-group-create-popup-image" id="sonet_group_create_popup_image" border="0">';
foreach ($arGroupProperties as $field => $arUserField) {
if (array_key_exists($field, $arGroup)) {
$arGroupProperties[$field]["VALUE"] = $arGroup["~" . $field];
$arGroupProperties[$field]["ENTITY_VALUE_ID"] = $arGroup["ID"];
}
}
$arGroupTmp["IS_EXTRANET_GROUP"] = "N";
if (CModule::IncludeModule("extranet") && CExtranet::IsExtranetSocNetGroup($group_id)) {
$arGroupTmp["IS_EXTRANET_GROUP"] = "Y";
}
} else {
$arGroupTmp["VISIBLE"] = "Y";
$arGroupTmp["IS_EXTRANET_GROUP"] = "N";
$group_id = 0;
}
}