From: Ian Kelling Date: Thu, 30 Jan 2020 23:28:35 +0000 (-0500) Subject: dont allow pending members to have aliases X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2c762923bf99162f16c84083cf753649a06b35a3;p=org.fsf.memberdashboard.git dont allow pending members to have aliases --- diff --git a/CRM/Memberdashboard/Page/Benefits.php b/CRM/Memberdashboard/Page/Benefits.php index ac6bfdb..0b69c86 100644 --- a/CRM/Memberdashboard/Page/Benefits.php +++ b/CRM/Memberdashboard/Page/Benefits.php @@ -29,13 +29,15 @@ class CRM_Memberdashboard_Page_Benefits extends CRM_Memberdashboard_Page { function hasValidMembership() { // Since we don't currently shut off an expired member's benefits, - // we only test that they have a membership, not that it is current. + // we only test that they have a membership, and not that its pending, + // because pending members havent yet paid us yet. $params = array( - 'contact_id' => $this->contact['id'] + 'contact_id' => $this->contact['id'], + 'status_id' => ['!=' => "Pending"] ); try { - $result = civicrm_api3('membership', 'get', $params); + $result = ('membership', 'get', $params); return $result['count'] > 0; } catch (CiviCRM_API3_Exception $e) { return false;