本文整理匯總了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;
}
}