示例#1
0
 } 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();
                 }
             }
         }
     }
 }
 $arResult["RND"] = $this->randString();
 $arResult["SECURE_AUTH"] = false;
 if (!CMain::IsHTTPS() && COption::GetOptionString('main', 'use_encrypted_auth', 'N') == 'Y') {
     $sec = new CRsaSecurity();
     if ($arKeys = $sec->LoadKeys()) {
         $sec->SetKeys($arKeys);