Skip to content

Commit

Permalink
System Admin: ensure users with no End Date and no recent timestamp a…
Browse files Browse the repository at this point in the history
…re not scrubbed in Data Retention
  • Loading branch information
SKuipers committed Feb 5, 2025
1 parent 948fbfd commit 2b099a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Domain/Traits/ScrubByPerson.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ public function getScrubbableRecords(string $cutoffDate, array $context = []) :

// Only get users whose dateEnd is before the cutoff, falling back to using the lastTimestamp
$query->where('((gibbonPerson.dateEnd IS NOT NULL AND gibbonPerson.dateEnd < :cutoffDate)
OR (gibbonPerson.dateEnd IS NULL AND gibbonPerson.lastTimestamp IS NOT NULL AND gibbonPerson.lastTimestamp < :cutoffDate)
OR (gibbonPerson.dateEnd IS NULL AND gibbonPerson.lastTimestamp IS NULL))')
OR (gibbonPerson.dateEnd IS NULL AND gibbonPerson.lastTimestamp IS NOT NULL AND gibbonPerson.lastTimestamp < :cutoffDate))')
->bindValue('cutoffDate', $cutoffDate);

return $this->runSelect($query)->fetchGroupedUnique();
Expand Down

0 comments on commit 2b099a1

Please sign in to comment.