comment and function name change
authorAndrew Engelbrecht <andrew@fsf.org>
Tue, 19 Apr 2022 22:53:34 +0000 (18:53 -0400)
committerroot <root@login0d.fsf.org>
Tue, 19 Apr 2022 22:53:34 +0000 (18:53 -0400)
for clarification

lib/Auth/Source/FSFDrupalAuth.php

index 5f6d8d3bd34f21cd938a37d3a509184aa49afad7..ad3c56604046a1a6d59e3ba1825a53289c408e9f 100644 (file)
@@ -279,7 +279,10 @@ class FSFDrupalAuth extends \SimpleSAML\Module\core\Auth\UserPassBase
         // query for access to board nomination process
         //
 
-       $meets_a_criterion = function ($all_contribs, $amount) {
+       // $all_contribs: whether to include all contrib types in total
+       //     ... false means only membership donations are counted.
+       // $amount: donation total threshold for qualifying
+       $meets_a_donation_criterion = function ($all_contribs, $amount) {
 
                $ranged_membership_donation_total =
                        $this->query_db('query_nomination_process_donations',
@@ -299,7 +302,7 @@ class FSFDrupalAuth extends \SimpleSAML\Module\core\Auth\UserPassBase
                return false;
        };
 
-       if ($meets_a_criterion(true, 5) || $meets_a_criterion(false, 5)) {
+       if ($meets_a_donation_criterion(true, 5) || $meets_a_donation_criterion(false, 5)) {
                $attributes['nomination_process'] = ['true'];
        } else {
                $attributes['nomination_process'] = ['false'];