Skip to content

Commit

Permalink
chore: remove expired concept groups even from the trash
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Jun 19, 2024
1 parent 0be8aac commit 6c17486
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/ColdTrick/GroupTools/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public static function removeExpiredConceptGroups(\Elgg\Event $event): void {
return;
}

elgg_call(ELGG_IGNORE_ACCESS, function() use ($days) {
elgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DELETED_ENTITIES, function() use ($days) {
/* @var $groups \ElggBatch */
$groups = elgg_get_entities([
'type' => 'group',
Expand All @@ -257,7 +257,7 @@ public static function removeExpiredConceptGroups(\Elgg\Event $event): void {
]);
/* @var $group \ElggGroup */
foreach ($groups as $group) {
if (!$group->delete()) {
if (!$group->delete(true, true)) {
$groups->reportFailure();
}
}
Expand Down

0 comments on commit 6c17486

Please sign in to comment.