In the component, certain things are dependent on dates in the database and cannot be handled directly when the data are changed by the administration or the member. An example is the termination date for a member: in most cases you will change the termination date to some date in the future. Once that date is reached, some things needs to be changed in the database. In these cases, you will need to use a crontab.
A crontab (also called cron job) is the scheduled executing of a script. Most hosting providers offer scheduled executing of scripts. Setup can be done in the webhosting control panel of your website. Different control panels are used by hosting providers. Most commonly used are Directadmin, Virtualmin, Plesk and cPanel.
We programmed a script to update the Joomla users and Acymailing, and this is included in the component My Member Administration. The script to be executed every x minutes / hour / day is called yourwebsite.com/index.php?option=com_mymembersoftware&view=cron&task=cron.accounts
This a script to synchronise Joomla groups to the Membership roles. It is executed as a webpage, and executed at least daily.
New and mapped accounts
A check is done for new accounts that have been created for people who have a current membership (without a termination date in the past; ending date of the membership). This check is based upon the fact if the email address is already in the membership administration. The Joomla account gets the "Group" (and thus the rights) which is connected to the role of the member. Also, the full name of the member will be given to that Joomla account. No e-mail is sent to the member about this update.
TODO: Only activated accounts should be enabled, because it looks like unactivated accounts that are enabled can be used.
A check for Joomla accounts of ex members (that have an expired termination date). This checks for members with an active Joomla account of which the termination date in MMS has expired. Those accounts are disabled.
For members whose memberships have ended (a termination date in the past), the accounts are updated: by default their accounts will be disabled, "blocked". So they have no more access to the information which is meant only for members. The second (alternative) way is to put these members in the default Joomla group, mostly "registered". This can be called by adding "&resetUser=true" when calling the cron url.
TODO: disabled users are not re-enabled, when the termination date is cleared again.
If the component Acymailing Enterprise is enabled, the subscriber will be enabled if it is a current member. If the membership has been cancelled, the Acymailing user is disabled and will no longer receive mailings (whatever list they are subscribed to).
For every valid E-mail address that exists in MMS, an Acymailing user will be created. With the name and e-mail that is in MMS. Further on in the cron process, the crontab will enable or disable the Acymailing user (based on start / end date).
Deleting member data requirement GDPR
One of the requirements of the GDPR is that data are not longer kept than that the organization needs them. The cron will delete memberdata, depending on the value in the MMS options "Number of days to keep data after expiry". The following data are deleted from the tables:
- alle member records with an end of subscription date > x days (defaults to 3650, but shorter is advised)
- alle applicant member records with an application date > x days (defaults to 3650, but shorter is advised)
This function can also be used for the "Right to forget", which is required by the GDPR. Members who want to be forgotten, get a end of subscription date which is higher than the configuration value.
If you use MMSSubscription, these data are also deleted:
- all mandates from members with an end of subscription date > x days
- all invoices from members with an end of subscription date > x days
- all invoices with an invoice date > x days
This function is also handy to delete test members: give them an end of subscription date of over 10 years.
Debug info is shown at the url, when the website is not in production mode. Activations will be logged in the joomla log file (mma.log), so that the webmaster can see every member that is activated and thus have access to the information of the website.
The log file is automatically cleaned up: items older than 14 days will be deleted.