Your IP : 18.218.26.27


Current Path : /home/bitrix/ext_www/dev.home-comfort.in.ua/local/components/webprofy/auth.link/
Upload File :
Current File : /home/bitrix/ext_www/dev.home-comfort.in.ua/local/components/webprofy/auth.link/component.php

<?
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();

$arResult = array();

$arParams["AUTHORIZE_LINK"] = !empty($arParams["AUTHORIZE_LINK"]) ? $arParams["AUTHORIZE_LINK"] : "#auth";
$arParams["PROFILE_PAGE_URL"] = !empty($arParams["PROFILE_PAGE_URL"]) ? $arParams["PROFILE_PAGE_URL"] : "/profile/";
$arParams["REGISTER_PAGE_URL"] = !empty($arParams["REGISTER_PAGE_URL"]) ? $arParams["REGISTER_PAGE_URL"] : "/profile/register";

if($USER->IsAuthorized()) {
	$userId = $USER->GetID();
	$dbUser = CUser::GetByID($userId);
	$arUser = $dbUser->Fetch();

	if(isset($arParams["SHOW_LOGIN_INSTEAD_NAME"]) && $arParams["SHOW_LOGIN_INSTEAD_NAME"] == "Y") {
		$arResult["NAME"] = $arUser["LOGIN"];
	} else {
		$arResult["NAME"] = $arUser["NAME"] . " " . $arUser["LAST_NAME"];
 	}

 	if(isset($arParams["SHOW_PICTURE"]) 
 		&& $arParams["SHOW_PICTURE"] == "Y"
 		&& (int)$arUser["PERSONAL_PHOTO"] > 0
 		) {
 		$arResult["PERSONAL_PHOTO_SRC"] = resizeImageGetSrc($arUser["PERSONAL_PHOTO"],"USER_PERSONAL_PHOTO");
 	}
} 



$arResult["ITEMS"] = $arFavorites;
$arResult["COUNT_ITEMS"] = !empty($arFavorites) ? count($arFavorites) : 0;

$this->IncludeComponentTemplate();
?>