Skip to content

Commit

Permalink
Merge pull request #194 from lionick/fix_expiration_policy
Browse files Browse the repository at this point in the history
Run expiration policy silently when there is another active membership
  • Loading branch information
NicolasLiampotis authored Oct 13, 2022
2 parents bd3a5ff + d89cbb1 commit 406e894
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/Model/CoExpirationPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,6 @@ public function executePolicies($coId, $appShell=null) {
$eligible_identical_inter = array_intersect($roles_to_expire[$role['CoPersonRole']['co_person_id']], $group);
$identical_remaining = array_diff($group, $eligible_identical_inter);
$identical_remaining_cnt = count($identical_remaining);
if ($identical_remaining_cnt > 0) {
continue;
}
}
}

Expand Down Expand Up @@ -552,6 +549,11 @@ public function executePolicies($coId, $appShell=null) {
}
}

// Dont inform anyone if there is another membership active
if ($identical_remaining_cnt > 0) {
continue;
}

// We have a bunch of substitutions to support, so process the template
// here. In addition, we'll also support the standard substitutions (though ACTOR_NAME
// probably doesn't make much sense) when processTemplate is called a second
Expand Down

0 comments on commit 406e894

Please sign in to comment.