} 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); $sec->AddToForm('system_auth_form' . $arResult["RND"], array('USER_PASSWORD')); $arResult["SECURE_AUTH"] = true; } } if (isset($APPLICATION->arAuthResult)) { $arResult['ERROR_MESSAGE'] = $APPLICATION->arAuthResult; } if ($arResult['ERROR_MESSAGE'] != '') { $arResult['ERROR'] = true; } if ($APPLICATION->NeedCAPTHAForLogin($arResult["USER_LOGIN"])) { $arResult["CAPTCHA_CODE"] = $APPLICATION->CaptchaGetCode(); } else { $arResult["CAPTCHA_CODE"] = false; } } else {
$post_data = ''; foreach($_POST as $vname=>$vvalue) { if($vname=="USER_LOGIN" || $vname=="USER_PASSWORD") continue; $post_data .= ($post_data == '' ? '' : '&').dump_post_var($vname, $vvalue); } if(!CMain::IsHTTPS() && COption::GetOptionString('main', 'use_encrypted_auth', 'N') == 'Y') { $sec = new CRsaSecurity(); if(($arKeys = $sec->LoadKeys())) { $sec->SetKeys($arKeys); $sec->AddToForm('form_auth', array('USER_PASSWORD', 'USER_CONFIRM_PASSWORD')); $bSecure = true; } } $sDocPath = $APPLICATION->GetCurPage(); ?> <form name="form_auth" method="post" target="auth_frame" class="bx-admin-auth-form" action="" novalidate> <div class="login-popup-alignment"> <div class="login-popup-alignment-2" id="popup_alignment"> <input type="hidden" name="AUTH_FORM" value="Y"> <div id="auth_form_wrapper"></div> <?php echo bitrix_sessid_post();
} // ******************** /User properties *************************************************** // initialize captcha if ($arResult["USE_CAPTCHA"] == "Y") $arResult["CAPTCHA_CODE"] = htmlspecialcharsbx($APPLICATION->CaptchaGetCode()); // set title if ($arParams["SET_TITLE"] == "Y") $APPLICATION->SetTitle(GetMessage("REGISTER_DEFAULT_TITLE")); //time zones $arResult["TIME_ZONE_ENABLED"] = CTimeZone::Enabled(); if($arResult["TIME_ZONE_ENABLED"]) $arResult["TIME_ZONE_LIST"] = CTimeZone::GetZones(); $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); $sec->AddToForm('regform', array('REGISTER[PASSWORD]', 'REGISTER[CONFIRM_PASSWORD]')); $arResult["SECURE_AUTH"] = true; } } // all done $this->IncludeComponentTemplate();
$arRequestParams = array("USER_CHECKWORD", "USER_PASSWORD", "USER_CONFIRM_PASSWORD"); foreach ($arRequestParams as $param) { $arResult[$param] = strlen($_REQUEST[$param]) > 0 ? $_REQUEST[$param] : ""; $arResult[$param] = htmlspecialcharsbx($arResult[$param]); } if (isset($_GET["USER_LOGIN"])) { $arResult["~LAST_LOGIN"] = CUtil::ConvertToLangCharset($_GET["USER_LOGIN"]); } elseif (isset($_POST["USER_LOGIN"])) { $arResult["~LAST_LOGIN"] = $_POST["USER_LOGIN"]; } else { $arResult["~LAST_LOGIN"] = $_COOKIE[COption::GetOptionString("main", "cookie_name", "BITRIX_SM") . "_LOGIN"]; } $arResult["LAST_LOGIN"] = htmlspecialcharsbx($arResult["~LAST_LOGIN"]); $userId = 0; if ($arResult["~LAST_LOGIN"] != '') { $res = CUser::GetByLogin($arResult["~LAST_LOGIN"]); if ($profile = $res->Fetch()) { $userId = $profile["ID"]; } } $arResult["GROUP_POLICY"] = CUser::GetGroupPolicy($userId); $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); $sec->AddToForm('bform', array('USER_PASSWORD', 'USER_CONFIRM_PASSWORD')); $arResult["SECURE_AUTH"] = true; } } $this->IncludeComponentTemplate();
if (!empty($arResult["USER_PROPERTIES"]["DATA"])) { $arResult["USER_PROPERTIES"]["SHOW"] = "Y"; } $arResult["bVarsFromForm"] = $strError == '' ? false : true; } // ******************** /User properties *************************************************** if ($arParams["SET_TITLE"] == "Y") { $APPLICATION->SetTitle(GetMessage("PROFILE_DEFAULT_TITLE")); } if ($bOk) { $arResult['DATA_SAVED'] = 'Y'; } //time zones $arResult["TIME_ZONE_ENABLED"] = CTimeZone::Enabled(); if ($arResult["TIME_ZONE_ENABLED"]) { $arResult["TIME_ZONE_LIST"] = CTimeZone::GetZones(); } $arResult["EMAIL_REQUIRED"] = COption::GetOptionString("main", "new_user_email_required", "Y") != "N"; //secure authorization $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); $sec->AddToForm('form1', array('NEW_PASSWORD', 'NEW_PASSWORD_CONFIRM')); $arResult["SECURE_AUTH"] = true; } } //socialservices $arResult["SOCSERV_ENABLED"] = IsModuleInstalled("socialservices"); $this->IncludeComponentTemplate();
$tabControl->AddEditField("NAME", GetMessage('NAME'), false, array("size"=>30, "maxlength"=>50), $str_NAME); $tabControl->AddEditField("LAST_NAME", GetMessage('LAST_NAME'), false, array("size"=>30, "maxlength"=>50), $str_LAST_NAME); $tabControl->AddEditField("SECOND_NAME", GetMessage('SECOND_NAME'), false, array("size"=>30, "maxlength"=>50), $str_SECOND_NAME); $tabControl->AddEditField("EMAIL", GetMessage('EMAIL'), true, array("size"=>30, "maxlength"=>50), $str_EMAIL); $tabControl->AddEditField("LOGIN", GetMessage('LOGIN'), true, array("size"=>30, "maxlength"=>50), $str_LOGIN); $tabControl->BeginCustomField("PASSWORD", GetMessage('NEW_PASSWORD_REQ'), true); $bSecure = false; if(!CMain::IsHTTPS() && COption::GetOptionString('main', 'use_encrypted_auth', 'N') == 'Y') { $sec = new CRsaSecurity(); if(($arKeys = $sec->LoadKeys())) { $sec->SetKeys($arKeys); $sec->AddToForm('user_edit_form', array('NEW_PASSWORD', 'NEW_PASSWORD_CONFIRM')); $bSecure = true; } } ?> <tr id="bx_pass_row" style="display:<?php echo $str_EXTERNAL_AUTH_ID != '' ? 'none' : ''; ?> ;"<?if($ID<=0 || $COPY_ID>0):?> class="adm-detail-required-field"<?endif?>> <td><?echo GetMessage('NEW_PASSWORD_REQ')?>:<sup><span class="required">1</span></sup></td> <td><input type="password" name="NEW_PASSWORD" size="30" maxlength="50" value="<? echo htmlspecialcharsbx($NEW_PASSWORD) ?>" autocomplete="off" style="vertical-align:middle;"> <?if($bSecure):?> <span class="bx-auth-secure" id="bx_auth_secure" title="<?echo GetMessage("AUTH_SECURE_NOTE")?>" style="display:none"> <div class="bx-auth-secure-icon"></div> </span> <noscript>