Skip to content

Commit

Permalink
pkp/pkp-lib#10174 Drop URL prefix from ORCID
Browse files Browse the repository at this point in the history
(cherry picked from commit bdde13a)
  • Loading branch information
jonasraoni committed Jul 9, 2024
1 parent e0da44d commit d163378
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ public function generateAuthorNode($doc, $journal, $issue, $submission, $author)
$authorElement->appendChild($doc->createElement('LastName'))->appendChild($doc->createTextNode(ucfirst($author->getLocalizedFamilyName())));
}
$authorElement->appendChild($doc->createElement('Affiliation'))->appendChild($doc->createTextNode($author->getLocalizedAffiliation()));
$orcidId = $author->getData('orcid');
// We're storing the ORCID with a URL (http://orcid.org/{$ID}), but the XML expects just the ID
$orcidId = explode('/', trim($author->getData('orcid') ?? '', '/'));
$orcidId = array_pop($orcidId);
if ($orcidId) {
$orcidNode = $authorElement->appendChild($doc->createElement('Identifier'));
$orcidNode->setAttribute('Source', 'ORCID');
Expand Down

0 comments on commit d163378

Please sign in to comment.