From 20ca8e09021c8e9c9dd683005b3c0d12f369c6df Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 5 Mar 2020 16:59:09 +0100 Subject: [PATCH] feat: compatibiliy with glpi 9.5 Signed-off-by: Thierry Bugier --- inc/fields/actorfield.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/fields/actorfield.class.php b/inc/fields/actorfield.class.php index e1c26a770..fb48f3aac 100644 --- a/inc/fields/actorfield.class.php +++ b/inc/fields/actorfield.class.php @@ -118,7 +118,11 @@ public function displayField($canEdit = true) { } else { $user = new User(); $user->getFromDB($item); - $value[] = $user->getRawName(); + if (method_exists($user, 'getFriendlyName')) { + $value[] = $user->getFriendlyName(); + } else { + $value[] = $user->getRawName(); + } } } echo implode('
', $value);