Skip to content

Commit

Permalink
Fix vv_person_id not found for ApiUser
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Feb 10, 2025
1 parent cc81bba commit d9e98f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ public function beforeFilter(\Cake\Event\EventInterface $event) {
$this->populateAvailableCos();

// Get Person ID
if($this->RegistryAuth->getAuthenticatedUser() !== null && $this->getCOID() !== null) {
if(
$this->RegistryAuth->isAuthenticatedUser()
&& !$this->RegistryAuth->isApiUser()
&& $this->getCOID() !== null
) {
$this->set('vv_person_id', $this->RegistryAuth->getPersonId($this->getCOID()));
}
}
Expand Down

0 comments on commit d9e98f1

Please sign in to comment.