CBlogUser :: GetUserInfo: Bitrix method

      
<?php 
//  CBlogUser :: GetUserInfo()
//  /dist/bitrix/modules/blog/general/blog_user.php:631

    
public static function GetUserInfo($id$path$arParams = array())
    {
        if (!empty(
CBlogPost::$arBlogUCache[$id]))
        {
            
$arResult["arUser"] = CBlogPost::$arBlogUCache[$id];
        }
        else
        {
            if (
intval($arParams["AVATAR_SIZE"]) <= 0)
                
$arParams["AVATAR_SIZE"] = 100;

            if (
intval($arParams["AVATAR_SIZE_COMMENT"]) <= 0)
                
$arParams["AVATAR_SIZE_COMMENT"] = 100;

            
$bResizeImmediate = (isset($arParams["RESIZE_IMMEDIATE"]) && $arParams["RESIZE_IMMEDIATE"] == "Y");

            
$arSelect = Array(
                
"FIELDS" => Array("ID""LAST_NAME""NAME""SECOND_NAME""LOGIN""PERSONAL_PHOTO""PERSONAL_GENDER""EXTERNAL_AUTH_ID")
            );

            if (
IsModuleInstalled('extranet'))
            {
                
$arSelect["SELECT"] = array('UF_DEPARTMENT');
            }

            
$dbUser CUser::GetList(
                (
$sort_by = Array('ID'=>'desc')),
                (
$dummy=''),
                Array(
"ID" => $id),
                
$arSelect
            
);
            if(
$arResult["arUser"] = $dbUser->GetNext())
            {
                if(
IntVal($arResult["arUser"]["PERSONAL_PHOTO"]) > 0)
                {
                    
$arResult["arUser"]["PERSONAL_PHOTO_file"] = CFile::GetFileArray($arResult["arUser"]["PERSONAL_PHOTO"]);
                    
$arResult["arUser"]["PERSONAL_PHOTO_resized"] = CFile::ResizeImageGet(
                        
$arResult["arUser"]["PERSONAL_PHOTO_file"],
                        array(
"width" => $arParams["AVATAR_SIZE"], "height" => $arParams["AVATAR_SIZE"]),
                        
BX_RESIZE_IMAGE_EXACT,
                        
false,
                        
false,
                        
$bResizeImmediate
                    
);
                    if (
$arResult["arUser"]["PERSONAL_PHOTO_resized"] !== false)
                        
$arResult["arUser"]["PERSONAL_PHOTO_img"] = CFile::ShowImage($arResult["arUser"]["PERSONAL_PHOTO_resized"]["src"], $arParams["AVATAR_SIZE"], $arParams["AVATAR_SIZE"], "border=0 align='right'");
                    
$arResult["arUser"]["PERSONAL_PHOTO_resized_30"] = CFile::ResizeImageGet(
                        
$arResult["arUser"]["PERSONAL_PHOTO_file"],
                        array(
"width" => $arParams["AVATAR_SIZE_COMMENT"], "height" => $arParams["AVATAR_SIZE_COMMENT"]),
                        
BX_RESIZE_IMAGE_EXACT,
                        
false,
                        
false,
                        
$bResizeImmediate
                    
);
                    if (
$arResult["arUser"]["PERSONAL_PHOTO_resized_30"] !== false)
                        
$arResult["arUser"]["PERSONAL_PHOTO_img_30"] = CFile::ShowImage($arResult["arUser"]["PERSONAL_PHOTO_resized_30"]["src"], $arParams["AVATAR_SIZE_COMMENT"], $arParams["AVATAR_SIZE_COMMENT"], "border=0 align='right'");
                }
                
$arResult["arUser"]["url"] = CComponentEngine::MakePathFromTemplate($path, array("user_id" => $id));
            }
            
CBlogPost::$arBlogUCache[$id] = $arResult["arUser"];
        }

        return 
$arResult["arUser"];
    }