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
  • Loading branch information
jonasraoni committed Jul 9, 2024
1 parent 445c833 commit bd23b1a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ 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 bd23b1a

Please sign in to comment.