当前位置: 首页>>代码示例>>PHP>>正文


PHP CExtranet::IsProfileViewable方法代码示例

本文整理汇总了PHP中CExtranet::IsProfileViewable方法的典型用法代码示例。如果您正苦于以下问题:PHP CExtranet::IsProfileViewable方法的具体用法?PHP CExtranet::IsProfileViewable怎么用?PHP CExtranet::IsProfileViewable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CExtranet的用法示例。


在下文中一共展示了CExtranet::IsProfileViewable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

         $db_rating = CRatings::GetByID($arParams["RATING_ID"]);
         if ($arRating = $db_rating->GetNext()) {
             $arResult["Rating"]["NAME"] = $arRating["NAME"];
         }
         $arListParams["SELECT"][] = "RATING_" . $arParams["RATING_ID"];
     }
     $dbUser = CUser::GetList($by = "id", $order = "asc", array("ID_EQUAL_EXACT" => $arParams["ID"]), $arListParams);
     $arResult["User"] = $dbUser->GetNext();
 } else {
     $dbUser = CUser::GetByID($arParams["ID"]);
     $arResult["User"] = $dbUser->GetNext();
 }
 if (!is_array($arResult["User"])) {
     $arResult["FatalError"] = GetMessage("SONET_P_USER_NO_USER") . ". ";
 } else {
     if (CModule::IncludeModule('extranet') && !CExtranet::IsProfileViewable($arResult["User"]) && $arResult["User"]["ID"] != $USER->GetID()) {
         return false;
     }
     $arResult["CurrentUserPerms"] = CSocNetUserPerms::InitUserPerms($GLOBALS["USER"]->GetID(), $arResult["User"]["ID"], CSocNetUser::IsCurrentUserModuleAdmin());
     if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite()) {
         $arResult["CurrentUserPerms"]["Operations"]["viewfriends"] = false;
     }
     if (IsModuleInstalled("im")) {
         $arResult["CurrentUserPerms"]["Operations"]["message"] = true;
     }
     $arResult["Urls"]["Edit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_EDIT"], array("user_id" => $arResult["User"]["ID"]));
     $arResult["Urls"]["Friends"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_FRIENDS"], array("user_id" => $arResult["User"]["ID"]));
     $arResult["Urls"]["FriendsAdd"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_FRIENDS_ADD"], array("user_id" => $arResult["User"]["ID"]));
     $arResult["Urls"]["FriendsDelete"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_FRIENDS_DELETE"], array("user_id" => $arResult["User"]["ID"]));
     $arResult["Urls"]["Groups"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_GROUPS"], array("user_id" => $arResult["User"]["ID"]));
     $arResult["Urls"]["Search"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_SEARCH"], array());
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例2: GetMessage

    if (!is_array($arResult["User"])) {
        $arResult["FatalError"] = GetMessage("SONET_P_USER_NO_USER") . ". ";
    }
    if (CModule::IncludeModule('extranet') && !CExtranet::IsProfileViewable($arResult["User"])) {
        return false;
    }
}
if (StrLen($arResult["FatalError"]) <= 0) {
    $arResult["UserRequest"] = false;
    if ($user2Request > 0) {
        $dbUser = CUser::GetByID($user2Request);
        $arResult["UserRequest"] = $dbUser->GetNext();
        if (!is_array($arResult["UserRequest"])) {
            $arResult["FatalError"] = GetMessage("SONET_P_USER_NO_USER") . ". ";
        }
        if (CModule::IncludeModule('extranet') && !CExtranet::IsProfileViewable($arResult["UserRequest"])) {
            return false;
        }
    }
}
if (StrLen($arResult["FatalError"]) <= 0) {
    $arResult["CurrentUserPerms"] = CSocNetUserPerms::InitUserPerms($GLOBALS["USER"]->GetID(), $arResult["User"]["ID"], CSocNetUser::IsCurrentUserModuleAdmin());
    $arResult["ALLOW_CREATE_GROUP"] = CSocNetUser::IsCurrentUserModuleAdmin() || $GLOBALS["APPLICATION"]->GetGroupRight("socialnetwork", false, "Y", "Y", array(SITE_ID, false)) >= "K";
    $arCacheKeys = array();
    $arNavigation = array();
    foreach ($arResult as $key => $value) {
        if (substr($key, 0, 7) == "filter_") {
            $arCacheKeys[] = $key;
        }
    }
    $arNavParams = array('nPageSize' => $arParams['ITEMS_COUNT']);
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例3: IsProfileViewableByID

 function IsProfileViewableByID($user_id, $site_id = false)
 {
     global $USER;
     if (CExtranet::IsExtranetAdmin() || IsModuleInstalled("bitrix24") && CSocNetUser::IsCurrentUserModuleAdmin(SITE_ID, false)) {
         return true;
     }
     if (IntVal($user_id) > 0 && strlen(CExtranet::GetExtranetSiteID()) > 0) {
         $dbUser = CUser::GetByID($user_id);
         $arUser = $dbUser->Fetch();
         if (!CExtranet::IsProfileViewable($arUser, $site_id)) {
             return false;
         }
     }
     return true;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:15,代码来源:extranet.php

示例4: CPHPCache

 }
 $arResult["User"]["DETAIL_URL"] = $tmpUserDetailUrl = $arParams['DETAIL_URL'];
 if ($bNeedGetUser) {
     $obCache = new CPHPCache();
     $strCacheID = $arParams["ID"] . "_" . $arParams["USE_THUMBNAIL_LIST"] . "_" . $arParams["THUMBNAIL_LIST_SIZE"] . "_" . $USER->GetID() . "_" . $bSocialNetwork;
     $path = "/user_card_new_" . intval($arParams["ID"] / TAGGED_user_card_size);
     if ($arParams['AJAX_CALL'] == 'INFO' || $obCache->StartDataCache($arParams["CACHE_TIME"], $strCacheID, $path)) {
         if ($arParams['AJAX_CALL'] != 'INFO' && defined("BX_COMP_MANAGED_CACHE")) {
             $CACHE_MANAGER->StartTagCache($path);
             $CACHE_MANAGER->RegisterTag("USER_CARD_" . intval($arParams["ID"] / TAGGED_user_card_size));
         }
         $dbUser = CUser::GetByID($arParams["ID"]);
         $arResult["User"] = $dbUser->Fetch();
         if (!$arResult["User"]) {
             $arResult["FatalError"] = GetMessage("MAIN_UL_NO_ID") . ". ";
         } elseif ($arParams['AJAX_CALL'] == 'INFO' && CModule::IncludeModule("extranet") && !CExtranet::IsProfileViewable($arResult["User"], SITE_ID)) {
             $arResult["FatalError"] = GetMessage("MAIN_UL_NO_ID") . ". ";
         }
         if (strlen($arResult["FatalError"]) <= 0 && $arParams["USE_THUMBNAIL_LIST"] == "Y" && $arParams['AJAX_CALL'] != 'INFO') {
             $iSize = $arParams["THUMBNAIL_LIST_SIZE"];
             $imageFile = false;
             $imageImg = false;
             if (intval($arResult["User"]["PERSONAL_PHOTO"]) <= 0 && $bSocialNetwork) {
                 switch ($arResult["User"]["PERSONAL_GENDER"]) {
                     case "M":
                         $suffix = "male";
                         break;
                     case "F":
                         $suffix = "female";
                         break;
                     default:
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php

示例5: array

 if ($postPerms > BLOG_PERMS_MODERATE || $postPerms >= BLOG_PERMS_WRITE && $arBlogPost["AUTHOR_ID"] == $GLOBALS["USER"]->GetID()) {
     $arResult["Post"] = $arBlogPost;
     $arResult["Post"]["arSonetPerms"] = array();
     $arResult["Post"]["arSonetPermsHidden"] = array();
     $arSonetPerms = CBlogPost::GetSocnetPerms(intval($_REQUEST["post_id"]));
     $bExtranetInstalled = CModule::IncludeModule("extranet");
     $arAvailableGroupID = CSocNetLogTools::GetAvailableGroups();
     foreach ($arSonetPerms as $key => $arSonetPerm) {
         foreach ($arSonetPerm as $entityId => $arPerm) {
             if ($key == "U") {
                 if (in_array("G2", $arPerm)) {
                     $arResult["Post"]["arSonetPerms"][] = array("type" => "groups", "item" => array("id" => "UA"));
                 } else {
                     $rsUserTmp = CUser::GetByID($entityId);
                     if ($arUserTmp = $rsUserTmp->Fetch()) {
                         $arResult["Post"][!$bExtranetInstalled || CExtranet::IsProfileViewable($arUserTmp) ? "arSonetPerms" : "arSonetPermsHidden"][] = array("type" => "users", "item" => array("id" => "U" . $entityId, "name" => CUser::FormatName(CSite::GetNameFormat(), $arUserTmp, true)));
                     }
                 }
             } elseif ($key == "SG") {
                 $arSonetGroup = CSocNetGroup::GetByID($entityId);
                 if ($arSonetGroup) {
                     $arResult["Post"][in_array($entityId, $arAvailableGroupID) ? "arSonetPerms" : "arSonetPermsHidden"][] = array("type" => "sonetgroups", "item" => array("id" => "SG" . $entityId, "name" => $arSonetGroup["NAME"]));
                 }
             } elseif ($key == "DR" && CModule::IncludeModule("iblock")) {
                 $rsDepartmentTmp = CIBlockSection::GetByID($entityId);
                 if ($arDepartmentTmp = $rsDepartmentTmp->GetNext()) {
                     $arResult["Post"]["arSonetPerms"][] = array("type" => "department", "item" => array("id" => "DR" . $entityId, "name" => $arDepartmentTmp["NAME"]));
                 }
             }
         }
     }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:result_modifier.php


注:本文中的CExtranet::IsProfileViewable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。