From c0f5f8bc3c40b081a44f1df7a7910e1d923d8fc6 Mon Sep 17 00:00:00 2001
From: Richard Bushell <rb@living.video>
Date: Sat, 9 May 2020 18:47:44 +0100
Subject: [PATCH] Revert "Fix user's profile image for Comments"

This reverts commit b21498165c847aff1cfb86bdf9f6e624dfc2273f.
---
 .../ModComments/modules/ModComments/models/Record.php  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pkg/vtiger/modules/ModComments/modules/ModComments/models/Record.php b/pkg/vtiger/modules/ModComments/modules/ModComments/models/Record.php
index 6d8807df4..aee0a319d 100644
--- a/pkg/vtiger/modules/ModComments/modules/ModComments/models/Record.php
+++ b/pkg/vtiger/modules/ModComments/modules/ModComments/models/Record.php
@@ -118,14 +118,14 @@ class ModComments_Record_Model extends Vtiger_Record_Model {
 			if (!empty($customer)) {
 				$recordModel = Vtiger_Record_Model::getInstanceById($customer);
 				$imageDetails = $recordModel->getImageDetails();
-				if (!empty($imageDetails[0]['url'])) {
-					return $imageDetails[0]['url'];
+				if(!empty($imageDetails)) {
+					return $imageDetails[0]['path'].'_'.$imageDetails[0]['name'];
 				} else
 					return vimage_path('CustomerPortal.png');
 			} else {
-				$imageDetails = $commentor->getImageDetails();
-				if (!empty($imageDetails[0]['url'])) {
-					return $imageDetails[0]['url'];
+				$imagePath = $commentor->getImageDetails();
+				if (!empty($imagePath[0]['name'])) {
+					return $imagePath[0]['path'] . '_' . $imagePath[0]['name'];
 				}
 			}
 		} elseif ($isMailConverterType) {
-- 
GitLab