fix: [sighting:anonymisation] Anonymize sightings if and only if anonymization is set in the settings

pull/9432/head
Sami Mokaddem 2023-11-20 08:57:29 +01:00
parent 3046275d0f
commit 4f524b9413
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 1 deletions

View File

@ -649,7 +649,7 @@ class Sighting extends AppModel
if ($showOrg && $sighting['org_id']) {
$sighting['Organisation'] = $this->getOrganisationById($sighting['org_id']);
}
if ($sighting['org_id'] != $user['org_id'] && ($anonymise || !empty($anonOrg))) {
if ($sighting['org_id'] != $user['org_id'] && $anonymise) {
if (empty($anonOrg)) {
unset($sighting['org_id']);
unset($sighting['Organisation']);