From 4843545171de42063f505fea83dec71577620d2e Mon Sep 17 00:00:00 2001 From: Molkobain Date: Thu, 15 Jul 2021 17:33:38 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04142=20-=20Fix=20UserRights::GetUserPict?= =?UTF-8?q?ureAbsUrl()=20returning=20user's=20placeholder=20picture=20for?= =?UTF-8?q?=20users=20with=20an=20unknown=20login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/userrights.class.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/userrights.class.inc.php b/core/userrights.class.inc.php index 7d1f56f92..9d80b48fa 100644 --- a/core/userrights.class.inc.php +++ b/core/userrights.class.inc.php @@ -1110,13 +1110,15 @@ class UserRights } } } - } // If no contact, check if user has a placeholder in they preferences - else { + } + // If no contact & empty login, check if current user has a placeholder in they preferences + elseif ('' === $sLogin) { $sPlaceholderPictureFilename = appUserPreferences::GetPref($sUserPicturePlaceholderPrefKey, null, static::GetUserId($sLogin)); if (!empty($sPlaceholderPictureFilename)) { $sPictureUrl = utils::GetAbsoluteUrlAppRoot().$sUserPicturesFolder.$sPlaceholderPictureFilename; } } + // Else, no contact and no login, then it's for an unknown origin (system, extension, ...) // Update cache static::$m_aCacheContactPictureAbsUrl[$sLogin] = $sPictureUrl;