Updating Member Currency

EAA/IAC memberships have an expiration date. We want to:

  • Remind members to renew a few weeks before the expiration date. This is handled by the Join/Renew block.
  • Change role from Current Member to Lapsed Member (see Permissions and Roles) upon reaching the expiration date so that they 1) can no longer access members-only content, and 2) see a reminder that they need to renew if/when they do log in.
  • Change role from Lapsed Member to Current Member upon renewal.

The latter actions are performed by a script named lapsed.php, which is invoked by the master script that downloads and processes the membership list provided by EAA. The lapsed.php script works as follows:

  • Collect the list of user ID (uid) fields for everyone except the site administrator and courtesy accounts (those with pseudo IAC numbers in the form 9999xxxx).
  • For each uid,
    • Get the corresponding user record
    • Get the corresponding profile2 record
    • If the user's membership expiration date has passed and the user has not been assigned the Lapsed User role,
      • Remove the Current Member role
      • Assign the Lapsed Member role
    • If the user's membership expiration date has not yet been reached and the user has not been assigned the Current User role,
      • Remove the Lapsed Member role
      • Assign the Current Member role

Note 1: Because users with the Editor role enjoy all of the privileges of a Current Member (and then some), it doesn't matter whether their accounts have Current Member or Lapsed Member permissions. Therefore the Editor role effectively has no expiration date. Nonetheless, the Join/Renew block will still display its warning message as the expiration date approaches, and an error message when it has passed.

Note 2: We don't want to send automated renewal notices to deceased members -- or more importantly, their grieving families. Assuming someone notifies EAA of a member's passing, that name will be excluded from the daily member download file. If we have a member record in our database that does not have a corresponding entry in the EAA download file, the syncit.php script will set a profile2 field named 'hidden' to 1 (true). The lapsed.php script checks the field value, and skips sending the renewal reminder if it is set to 1. However EAA also excludes records of people who are still alive but whose memberships expired long ago, therefore it is possible for a 'hidden' record to be renewed. This is also handled by syncit.php.