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


PHP CSocServAuthManager::GetActiveAuthServices方法代码示例

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


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

示例1: checkActiveSocServ

 protected function checkActiveSocServ()
 {
     $oAuthManager = new CSocServAuthManager();
     $socNetServices = $oAuthManager->GetActiveAuthServices(array());
     //check active google oauth service
     if (empty($socNetServices['LiveIDOAuth'])) {
         $this->sendJsonResponse(array('error' => GetMessage('WD_DOC_INSTALL_SOCSERV_SKYDRIVE')));
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:9,代码来源:class.php

示例2: htmlspecialcharsbx

             }
         }
     }
 }
 if (defined("HTML_PAGES_FILE") && !defined("ERROR_404")) {
     $arResult["~USER_LOGIN"] = "";
 } else {
     $arResult["~USER_LOGIN"] = $_COOKIE[COption::GetOptionString("main", "cookie_name", "BITRIX_SM") . "_LOGIN"];
 }
 $arResult["USER_LOGIN"] = $arResult["LAST_LOGIN"] = htmlspecialcharsbx($arResult["~USER_LOGIN"]);
 $arResult["~LAST_LOGIN"] = $arResult["~USER_LOGIN"];
 $arResult["AUTH_SERVICES"] = false;
 $arResult["CURRENT_SERVICE"] = false;
 if (!$USER->IsAuthorized() && CModule::IncludeModule("socialservices")) {
     $oAuthManager = new CSocServAuthManager();
     $arServices = $oAuthManager->GetActiveAuthServices($arResult);
     if (!empty($arServices)) {
         $arResult["AUTH_SERVICES"] = $arServices;
         if (isset($_REQUEST["auth_service_id"]) && $_REQUEST["auth_service_id"] != '' && isset($arResult["AUTH_SERVICES"][$_REQUEST["auth_service_id"]])) {
             $arResult["CURRENT_SERVICE"] = $_REQUEST["auth_service_id"];
             if (isset($_REQUEST["auth_service_error"]) && $_REQUEST["auth_service_error"] != '') {
                 $arResult['ERROR_MESSAGE'] = $oAuthManager->GetError($arResult["CURRENT_SERVICE"], $_REQUEST["auth_service_error"]);
             } elseif (!$oAuthManager->Authorize($_REQUEST["auth_service_id"])) {
                 $ex = $APPLICATION->GetException();
                 if ($ex) {
                     $arResult['ERROR_MESSAGE'] = $ex->GetString();
                 }
             }
         }
     }
 }
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:component.php

示例3: GetMessage

	function check_socnet()
	{
		if (!CModule::IncludeModule('socialservices'))
			return $this->Result(null, GetMessage("MAIN_SC_NO_SOCIAL_MODULE"));
		$oAuthManager = new CSocServAuthManager();
		$arActiveSocServ = $oAuthManager->GetActiveAuthServices(array());
		if (count($arActiveSocServ))
			return true;
		return $this->Result(null, GetMessage("MAIN_SC_NO_SOCIAL_SERVICES"));
	}
开发者ID:nycmic,项目名称:bittest,代码行数:10,代码来源:site_checker.php

示例4: htmlspecialcharsbx

    }
}
$arResult["~LAST_LOGIN"] = $_COOKIE[COption::GetOptionString("main", "cookie_name", "BITRIX_SM") . "_LOGIN"];
$arResult["LAST_LOGIN"] = htmlspecialcharsbx($arResult["~LAST_LOGIN"]);
$arResult["STORE_PASSWORD"] = COption::GetOptionString("main", "store_password", "Y") == "Y" ? "Y" : "N";
$arResult["NEW_USER_REGISTRATION"] = COption::GetOptionString("main", "new_user_registration", "N") == "Y" ? "Y" : "N";
$arResult["ALLOW_SOCSERV_AUTHORIZATION"] = COption::GetOptionString("main", "allow_socserv_authorization", "Y") != "N" ? "Y" : "N";
$arResult["AUTH_SERVICES"] = false;
$arResult["CURRENT_SERVICE"] = false;
$arResult["FOR_INTRANET"] = false;
if (IsModuleInstalled("intranet") || IsModuleInstalled("rest")) {
    $arResult["FOR_INTRANET"] = true;
}
if (!$USER->IsAuthorized() && CModule::IncludeModule("socialservices") && $arResult["ALLOW_SOCSERV_AUTHORIZATION"] == 'Y') {
    $oAuthManager = new CSocServAuthManager();
    $arServices = $oAuthManager->GetActiveAuthServices(array('BACKURL' => $arResult['~BACKURL'], 'FOR_INTRANET' => $arResult['FOR_INTRANET']));
    if (!empty($arServices)) {
        $arResult["AUTH_SERVICES"] = $arServices;
        if (isset($_REQUEST["auth_service_id"]) && $_REQUEST["auth_service_id"] != '' && isset($arResult["AUTH_SERVICES"][$_REQUEST["auth_service_id"]])) {
            $arResult["CURRENT_SERVICE"] = $_REQUEST["auth_service_id"];
            if (isset($_REQUEST["auth_service_error"]) && $_REQUEST["auth_service_error"] != '') {
                $arResult['ERROR_MESSAGE'] = $oAuthManager->GetError($arResult["CURRENT_SERVICE"], $_REQUEST["auth_service_error"]);
            } elseif (!$oAuthManager->Authorize($_REQUEST["auth_service_id"])) {
                $ex = $APPLICATION->GetException();
                if ($ex) {
                    $arResult['ERROR_MESSAGE'] = $ex->GetString();
                }
            }
        }
    }
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例5: SendSocialservicesMessages

 public static function SendSocialservicesMessages()
 {
     $oAuthManager = new CSocServAuthManager();
     $arActiveSocServ = $oAuthManager->GetActiveAuthServices(array());
     if (!(isset($arActiveSocServ["Twitter"]) && isset($arActiveSocServ["Twitter"]["__active"])) || !function_exists("hash_hmac")) {
         return false;
     }
     $ttl = 86400;
     $cache_id = 'socserv_mes_user';
     $obCache = new CPHPCache();
     $cache_dir = '/bx/socserv_mes_user';
     $arSocServMessage = array();
     if ($obCache->InitCache($ttl, $cache_id, $cache_dir)) {
         $arSocServMessage = $obCache->GetVars();
     } else {
         $dbSocServMessage = CSocServMessage::GetList(array(), array('SUCCES_SENT' => 'N'), false, array("nTopCount" => 5), array("ID", "SOCSERV_USER_ID", "PROVIDER", "MESSAGE"));
         while ($arSocMessage = $dbSocServMessage->Fetch()) {
             $arSocServMessage[] = $arSocMessage;
         }
         if (empty($arSocServMessage)) {
             if ($obCache->StartDataCache()) {
                 $obCache->EndDataCache($arSocServMessage);
             }
         }
     }
     if (is_array($arSocServMessage) && !empty($arSocServMessage)) {
         foreach ($arSocServMessage as $arSocMessage) {
             $arResult = CSocServAuthManager::SendUserMessage($arSocMessage['SOCSERV_USER_ID'], $arSocMessage['PROVIDER'], $arSocMessage['MESSAGE'], $arSocMessage['ID']);
             if ($arResult !== false && is_array($arResult) && !preg_match("/error/i", join(",", array_keys($arResult)))) {
                 self::MarkMessageAsSent($arSocMessage['ID']);
             }
         }
     }
     return "CSocServAuthManager::SendSocialservicesMessages();";
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:35,代码来源:authmanager.php

示例6: CSocServGoogleOAuth

	$o["F_SIZE"] = $fileOptT["F_SIZE"];
	CWebDavExtLinks::GetExtLink($arParams, $o);
}

if(!empty($_REQUEST['editInGoogle']))
{
	CUtil::JSPostUnescape();
	CWebDavExtLinks::CheckSessID();
	CWebDavExtLinks::CheckRights($ob);

	CModule::IncludeModule('socialservices');
	$socGoogleOAuth = new CSocServGoogleOAuth();
	$googleOAuth = CUtil::JSEscape($socGoogleOAuth->GetFormHtml(array('GET_URL' => true)));

	$oAuthManager = new CSocServAuthManager();
	$arServices = $oAuthManager->GetActiveAuthServices(array());//check active google oauth service
	$dbSocservUser = CSocServAuthDB::GetList(array(), array('EXTERNAL_AUTH_ID' => 'GoogleOAuth', 'USER_ID' => $USER->GetId()));
	$row = $dbSocservUser->Fetch();
	if(!$row || empty($row['OATOKEN']))
	{
		$APPLICATION->RestartBuffer();
		echo <<<HTML
<script type="text/javascript">
	window.location.href = "{$googleOAuth}";
</script>
HTML;
	}
	else
	{
		//todo drive edit
		//require_once $_SERVER['DOCUMENT_ROOT'].'/'.BX_ROOT.'/modules/drive/worker.php';
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:webdav.php

示例7: array

TrimArr($arParams['USER_PROPERTY_CONTACT']);
TrimArr($arParams['USER_PROPERTY_MAIN']);
TrimArr($arParams['EDITABLE_FIELDS']);
if (!is_array($arParams['EDITABLE_FIELDS']) || count($arParams['EDITABLE_FIELDS']) <= 0) {
    $arParams['EDITABLE_FIELDS'] = array('LOGIN', 'NAME', 'SECOND_NAME', 'LAST_NAME', 'EMAIL', 'TIME_ZONE', 'PERSONAL_BIRTHDAY', 'PERSONAL_CITY', 'PERSONAL_COUNTRY', 'PERSONAL_FAX', 'PERSONAL_GENDER', 'PERSONAL_ICQ', 'PERSONAL_MAILBOX', 'PERSONAL_MOBILE', 'PERSONAL_PAGER', 'PERSONAL_PHONE', 'PERSONAL_PHOTO', 'PERSONAL_STATE', 'PERSONAL_STREET', 'PERSONAL_WWW', 'PERSONAL_ZIP');
    if ($arParams['IS_FORUM'] == 'Y') {
        $arParams['EDITABLE_FIELDS'] = array_merge($arParams['EDITABLE_FIELDS'], array('FORUM_SHOW_NAME', 'FORUM_DESCRIPTION', 'FORUM_INTERESTS', 'FORUM_SIGNATURE', 'FORUM_AVATAR', 'FORUM_HIDE_FROM_ONLINE', 'FORUM_SUBSC_GROUP_MESSAGE', 'FORUM_SUBSC_GET_MY_MESSAGE'));
    }
    if ($arParams['IS_BLOG'] == 'Y') {
        $arParams['EDITABLE_FIELDS'] = array_merge($arParams['EDITABLE_FIELDS'], array('BLOG_ALIAS', 'BLOG_DESCRIPTION', 'BLOG_INTERESTS', 'BLOG_AVATAR', 'BLOG_SIGNATURE'));
    }
}
$arResult["arSocServ"] = array();
if (CModule::IncludeModule("socialservices")) {
    $oAuthManager = new CSocServAuthManager();
    $arResult["arSocServ"] = $oAuthManager->GetActiveAuthServices(array());
    if (!empty($arResult["arSocServ"])) {
        $arParams['EDITABLE_FIELDS'][] = 'SOCSERVICES';
    }
}
if (in_array('TIME_ZONE', $arParams['EDITABLE_FIELDS'])) {
    $arParams['EDITABLE_FIELDS'][] = 'AUTO_TIME_ZONE';
}
$arResult["urlToCancel"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arParams["ID"]));
$CurrentUserPerms = CSocNetUserPerms::InitUserPerms($USER->GetID(), $arParams["ID"], CSocNetUser::IsCurrentUserModuleAdmin(SITE_ID, CModule::IncludeModule("bitrix24") && CBitrix24::IsPortalAdmin($USER->GetID()) ? false : true));
if (!$CurrentUserPerms["Operations"]["modifyuser"] || !$CurrentUserPerms["Operations"]["modifyuser_main"]) {
    $arParams['ID'] = $USER->GetID();
}
$arResult["bEdit"] = $USER->CanDoOperation('edit_own_profile') || $USER->IsAdmin() ? "Y" : "N";
if ($arResult['bEdit'] != 'Y') {
    $APPLICATION->AuthForm(GetMessage('SONET_P_PU_NO_RIGHTS'));
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例8: CSocServAuthManager

	</div>
</div>
</form>

<div id="bx-soa-saved-files" style="display:none"></div>
<div id="bx-soa-soc-auth-services" style="display:none">
	<?php 
    $arServices = false;
    $arResult["ALLOW_SOCSERV_AUTHORIZATION"] = \Bitrix\Main\Config\Option::get("main", "allow_socserv_authorization", "Y") != "N" ? "Y" : "N";
    $arResult["FOR_INTRANET"] = false;
    if (\Bitrix\Main\ModuleManager::isModuleInstalled("intranet") || \Bitrix\Main\ModuleManager::isModuleInstalled("rest")) {
        $arResult["FOR_INTRANET"] = true;
    }
    if (\Bitrix\Main\Loader::includeModule("socialservices") && $arResult["ALLOW_SOCSERV_AUTHORIZATION"] == 'Y') {
        $oAuthManager = new CSocServAuthManager();
        $arServices = $oAuthManager->GetActiveAuthServices(array('BACKURL' => $this->arParams['~CURRENT_PAGE'], 'FOR_INTRANET' => $arResult['FOR_INTRANET']));
        if (!empty($arServices)) {
            $APPLICATION->IncludeComponent("bitrix:socserv.auth.form", "flat", array("AUTH_SERVICES" => $arServices, "AUTH_URL" => $arParams["~CURRENT_PAGE"], "POST" => $arResult["POST"]), $component, array("HIDE_ICONS" => "Y"));
        }
    }
    ?>
</div>

<?php 
    $signer = new \Bitrix\Main\Security\Sign\Signer();
    $signedParams = $signer->sign(base64_encode(serialize($arParams)), 'sale.order.ajax');
    $messages = \Bitrix\Main\Localization\Loc::loadLanguageFile(__FILE__);
    ?>

<script type="text/javascript">
	BX.message(<?php 
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:template.php


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