Skip to content

Commit

Permalink
Fix issues with data retrieval for GDPR requests
Browse files Browse the repository at this point in the history
Unnecessary `JOIN` removed and required `?->` added.
  • Loading branch information
tomudding committed Jan 1, 2024
1 parent add7f3a commit 9df01ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion module/Activity/src/Model/SignupFieldValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function toGdprArray(): array
return [
'id' => $this->getId(),
'value' => $this->getValue(),
'option' => $this->getOption()->toGdprArray(),
'option' => $this->getOption()?->toGdprArray(),
];
}
}
5 changes: 2 additions & 3 deletions module/User/src/Mapper/ApiAppAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ public function getLastAuthentication(
public function getMemberAuthenticationsPerApiApp(MemberModel $member): array
{
$qb = $this->getRepository()->createQueryBuilder('a');
$qb->select('a, app')
->leftJoin(ApiAppModel::class, 'app', 'WITH', 'a.apiApp = app.id')
$qb->select('a')
->where('a.user = :user_id')
->groupBy('app.appId')
->groupBy('a.apiApp')
->orderBy('a.time', 'DESC')
->setParameter('user_id', $member->getLidnr());

Expand Down

0 comments on commit 9df01ab

Please sign in to comment.