Skip to content
Snippets Groups Projects
Commit c68ffbc7 authored by Eric Bremner's avatar Eric Bremner Committed by Igor Biki
Browse files

ISTWCMS-5195: fixing author on get node data

parent 09b761b8
No related branches found
No related tags found
1 merge request!169Feature/istwcms 5195 ebremner node theming
...@@ -383,7 +383,6 @@ class UwNodeFieldValue { ...@@ -383,7 +383,6 @@ class UwNodeFieldValue {
// Set the author to the person who made blog. // Set the author to the person who made blog.
$author = [ $author = [
'name' => $node->getOwner()->getDisplayName(), 'name' => $node->getOwner()->getDisplayName(),
'link' => NULL,
]; ];
} }
...@@ -393,11 +392,11 @@ class UwNodeFieldValue { ...@@ -393,11 +392,11 @@ class UwNodeFieldValue {
// Get the link field from the node. // Get the link field from the node.
$link = $node->field_uw_author_link->getValue(); $link = $node->field_uw_author_link->getValue();
// Set the author name and link (if any). $author['name'] = $author_name;
$author = [
'name' => $author_name, if (!empty($link)) {
'link' => empty($link) ? NULL : $link[0]['uri'], $author['link'] = $link[0]['uri'];
]; }
} }
return $author; return $author;
......
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