• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/authproviders.php
  • Класс: COtherAuthProvider
  • Вызов: COtherAuthProvider::GetFormHtml
public function GetFormHtml($arParams=false)
{
	global $USER;

	if (isset($arParams["other"]) && is_array($arParams["other"]) && $arParams["other"]["disabled"] == "true")
	{
		return false;
	}

	$elements = "";
	$arFinderParams = array(
		"PROVIDER" => "other",
		"TYPE" => 3,
	);

	$arItem = array(
		"ID" => "U".$USER->GetID(),
		"AVATAR" => "/bitrix/js/main/core/images/access/avatar-user-auth.png",
		"NAME" => (($s = trim($USER->GetFormattedName(false, false))) <> ''? $s : $USER->GetLogin()),
		"DESC" => GetMessage("authprov_user_curr"),
	);
	$elements .= CFinder::GetFinderItem($arFinderParams, $arItem);

	if(!isset($arParams["other"]) || !is_array($arParams["other"]) || $arParams["other"]["disabled_cr"] != "true")
	{
		$arItem = array(
			"ID" => "CR",
			"AVATAR" => "/bitrix/js/main/core/images/access/avatar-user-author.png",
			"NAME" => GetMessage("authprov_author"),
			"DESC" => GetMessage("authprov_author_desc"),
		);
		$elements .= CFinder::GetFinderItem($arFinderParams, $arItem);
	}

	if(!isset($arParams["other"]) || !is_array($arParams["other"]) || $arParams["other"]["disabled_g2"] != "true")
	{
		$arItem = array(
			"ID" => "G2",
			"AVATAR" => "/bitrix/js/main/core/images/access/avatar-user-everyone.png",
			"NAME" => GetMessage("authprov_all"),
			"DESC" => GetMessage("authprov_all_desc"),
		);
		$elements .= CFinder::GetFinderItem($arFinderParams, $arItem);
	}

	if(!isset($arParams["other"]["disabled_au"]) || $arParams["other"]["disabled_au"] != "true")
	{
		$arItem = array(
			"ID" => "AU",
			"AVATAR" => "/bitrix/js/main/core/images/access/avatar-user-auth.png",
			"NAME" => GetMessage("authprov_authorized"),
			"DESC" => GetMessage("authprov_authorized_desc"),
		);
		$elements .= CFinder::GetFinderItem($arFinderParams, $arItem);
	}

	$arPanels = array(
		array(
			"NAME" => GetMessage("authprov_other"),
			"ELEMENTS" => $elements,
			"SELECTED" => "Y",
		),
	);
	$html = CFinder::GetFinderAppearance($arFinderParams, $arPanels);

	return array("HTML"=>$html);
}