%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/local/components/UB/customer.public_profile/
Upload File :
Create Path :
Current File : /home/bitrix/www/local/components/UB/customer.public_profile/component.php

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

if (isset($_REQUEST['USER_ID']) && strlen($_REQUEST['USER_ID'])>0) {

	if (intval($_REQUEST['USER_ID'])>0)
		$rsUser = CUser::GetByID(intval($_REQUEST['USER_ID']));
	else {
		$rsUser = CUser::GetList(($by="id"), ($order="asc"),array('WORK_COMPANY'=>$_REQUEST['USER_ID']), array('SELECT'=>array('UF_*')));
	}

	if ($arUser = $rsUser->Fetch()) {
		$arResult['CUSTOMER'] = $arUser;
		$arResult['ISADMIN'] = in_array(MODERATOR_GROUP,CUser::GetUserGroup($arUser['ID']));
	}
	else 
		$arResult['ERRORS'] = GetMessage("USER_PROFILE").$_REQUEST['USER_ID'].GetMessage("IS_NOT_FOUND");
	
}
else {
	$arResult['ERRORS'] = GetMessage("USER_ID_IS_NOT_SPECIFIED");
}

$this->IncludeComponentTemplate();
?>

Zerion Mini Shell 1.0