• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/lib/invitedispatcher.php
  • Класс: BitrixWebdavInviteDispatcher
  • Вызов: InviteDispatcher::getUserPictureSrc
private function getUserPictureSrc($photoId, $width = 21, $height = 21)
{
	static $cache = array();

	$photoId = (int) $photoId;
	$key = $photoId . " $width $height";

	if (isset($cache[$key]))
	{
		$src = $cache[$key];
	}
	else
	{
		$src = false;
		if ($photoId > 0)
		{
			$imageFile = CFile::getFileArray($photoId);
			if ($imageFile !== false)
			{
				$fileTmp = CFile::resizeImageGet(
					$imageFile,
					array("width" => $width, "height" => $height),
					BX_RESIZE_IMAGE_EXACT,
					false
				);
				$src = $fileTmp["src"];
			}

			$cache[$key] = $src;
		}
	}

	return $src;
}