Skip to content
Snippets Groups Projects
Commit aa37e8c2 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #14006 TIME 0:15 fix registered mail recipient format in list

parent 3e92e1ee
No related branches found
No related tags found
No related merge requests found
......@@ -952,7 +952,13 @@ class ResourceListController
} elseif ($value['value'] == 'getRegisteredMailRecipient') {
if (!empty($registeredMail)) {
$recipient = json_decode($registeredMail['recipient'], true);
$recipient = $recipient['company'] . ' ' . $recipient['firstname'] . ' ' . $recipient['lastname'];
if (!empty($recipient['company']) && (!empty($recipient['firstname']) || !empty($recipient['lastname']))) {
$recipient = $recipient['firstname'] . ' ' . $recipient['lastname'] . ' (' . $recipient['company'] . ')';
} elseif (empty($recipient['company']) && (!empty($recipient['firstname']) || !empty($recipient['lastname']))) {
$recipient = $recipient['firstname'] . ' ' . $recipient['lastname'];
} elseif (!empty($recipient['company']) && empty($recipient['firstname']) && empty($recipient['lastname'])) {
$recipient = $recipient['company'];
}
$value['displayValue'] = $recipient;
} else {
$value['displayValue'] = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment