N°2750 - Regression: Fix default user profile image not shown in portal due to N°2060

This commit is contained in:
Molkobain
2020-02-06 10:06:18 +01:00
parent f3576cffb0
commit e96a8387a0
2 changed files with 7 additions and 6 deletions

View File

@@ -49,6 +49,7 @@ services:
$bDebug: '%kernel.debug%'
$sPortalCachePath: '%kernel.cache_dir%/'
$sPortalId: '%env(string:PORTAL_ID)%'
$sCombodoPortalBaseAbsoluteUrl: '%env(string:COMBODO_PORTAL_BASE_ABSOLUTE_URL)%'
$aCombodoPortalInstanceConf: '%combodo.portal.instance.conf%'
$sCombodoPortalInstanceAbsoluteUrl: '%env(string:COMBODO_PORTAL_INSTANCE_ABSOLUTE_URL)%'

View File

@@ -37,8 +37,8 @@ class CombodoCurrentContactPhotoUrl
{
/** @var \User $oUser */
private $oUser;
/** @var string $sCombodoPortalInstanceAbsoluteUrl */
private $sCombodoPortalInstanceAbsoluteUrl;
/** @var string $sCombodoPortalBaseAbsoluteUrl */
private $sCombodoPortalBaseAbsoluteUrl;
/** @var string|null $sContactPhotoUrl */
private $sContactPhotoUrl;
/** @var \Symfony\Component\DependencyInjection\ContainerInterface */
@@ -49,13 +49,13 @@ class CombodoCurrentContactPhotoUrl
*
* @param \User $oUser
* @param \Symfony\Component\DependencyInjection\ContainerInterface $oContainer
* @param string $sCombodoPortalInstanceAbsoluteUrl
* @param string $sCombodoPortalBaseAbsoluteUrl
*/
public function __construct(User $oUser, ContainerInterface $oContainer, $sCombodoPortalInstanceAbsoluteUrl)
public function __construct(User $oUser, ContainerInterface $oContainer, $sCombodoPortalBaseAbsoluteUrl)
{
$this->oUser = $oUser;
$this->oContainer = $oContainer;
$this->sCombodoPortalInstanceAbsoluteUrl = $sCombodoPortalInstanceAbsoluteUrl;
$this->sCombodoPortalBaseAbsoluteUrl = $sCombodoPortalBaseAbsoluteUrl;
$this->sContactPhotoUrl = null;
}
@@ -82,7 +82,7 @@ class CombodoCurrentContactPhotoUrl
private function ComputeContactPhotoUrl()
{
// Contact
$sContactPhotoUrl = "{$this->sCombodoPortalInstanceAbsoluteUrl}img/user-profile-default-256px.png";
$sContactPhotoUrl = "{$this->sCombodoPortalBaseAbsoluteUrl}img/user-profile-default-256px.png";
// - Checking if we can load the contact
try
{