diff --git a/api/v1/orcid/OrcidController.php b/api/v1/orcid/OrcidController.php index adc0659b4a4..29c5f9d7dca 100644 --- a/api/v1/orcid/OrcidController.php +++ b/api/v1/orcid/OrcidController.php @@ -83,6 +83,7 @@ public function requestAuthorVerification(Request $illuminateRequest): JsonRespo $author = $validate['author']; /** @var Author $author */ try { + $author->setData('orcidVerificationRequested', true); dispatch(new SendAuthorMail($author, $context, true)); } catch (\Exception $exception) { return response()->json([ diff --git a/classes/orcid/actions/VerifyAuthorWithOrcid.php b/classes/orcid/actions/VerifyAuthorWithOrcid.php index d769bc67b54..f705462fc04 100644 --- a/classes/orcid/actions/VerifyAuthorWithOrcid.php +++ b/classes/orcid/actions/VerifyAuthorWithOrcid.php @@ -96,6 +96,7 @@ public function execute(): self $this->author->setOrcid($orcidUri); $this->author->setOrcidVerified(true); + $this->author->setData('orcidVerificationRequested', null); if (OrcidManager::isSandbox($context)) { $this->author->setData('orcidEmailToken', null); } @@ -133,7 +134,6 @@ public function execute(): self * Takes template variables for frontend display from OAuth process and assigns them to the TemplateManager. * * @param TemplateManager $templateMgr The template manager to which the variable should be set - * @return void */ public function updateTemplateMgrVars(TemplateManager &$templateMgr): void { @@ -146,8 +146,6 @@ public function updateTemplateMgrVars(TemplateManager &$templateMgr): void * Helper to set ORCID and OAuth values to the author. NB: Does not save updated Author instance to the database. * * @param string $orcidUri Complete ORCID URL - * @param array $results - * @return void */ private function setOrcidAccessData(string $orcidUri, array $results): void { diff --git a/schemas/author.json b/schemas/author.json index 18fbfd56566..41a676edfb9 100644 --- a/schemas/author.json +++ b/schemas/author.json @@ -193,6 +193,10 @@ "validation": [ "nullable" ] + }, + "orcidVerificationRequested": { + "type": "boolean", + "apiSummary": false } } }