Repository navigation
Installation Guide
This guide details the steps to install and enable the ESN Membership Manager module on your Drupal website.
Before installing, ensure your environment meets the following requirements:
-
Drupal: Version 10.3 or 11 (
^10.3 || ^11). -
PHP: Version 8.3 or higher (
^8.3). -
PHP Extensions:
gd,openssl, andsimplexml. - Composer: Required for managing dependencies.
- Access: Administrator access to the Drupal site and SSH/Terminal access to the server.
- Stripe Account: Required for ESNcard payment processing.
When installing via Composer, the following dependencies are resolved automatically:
-
Omnia (
^1.7): Shared foundation providing core settings, email handling, entity base classes, and shared Google/Apple/Stripe service integrations. -
ESN Accounts API (
^1.1): Used for organisation/section data and automated ESNer status verification. -
TCPDF (
^6.11): Used to generate printable ESNcard face-photo PDF sheets. -
Drupal Contrib Modules:
views_bulk_operationsandsimple_oauth(for the mobile Scanner app).
Ensure your root composer.json includes the Drupal and ESN Composer repositories:
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"esn": {
"type": "composer",
"url": "https://packages.esn.org"
}
}This is the preferred method as it automatically handles all PHP and Drupal dependencies and integrates with your site's autoloader.
Run the following command from your Drupal project root:
composer require esn-cy/esn-membership-managerIf you prefer to manage the code manually:
- Navigate to your Drupal project's modules directory:
cd /path/to/your/drupal/web/modules/custom - Clone the repository:
git clone https://github.com/esn-cy/esn-membership-manager.git esn_membership_manager
- Install dependencies manually within the module folder:
cd esn_membership_manager && composer install
You can enable the module using Drush (recommended) or the Drupal Administration UI.
Using Drush:
drush en esn_membership_manager -yUsing the UI:
- Log in to your Drupal site as an administrator.
- Navigate to Extend (
/admin/modules). - Search for "ESN Membership Manager".
- Check the box and click Install.
Note
During installation, the module automatically:
- Creates the protected private storage directory (
../../private/esn_membership_manager_storage) with a restrictive >.htaccessfile. - Creates the
ESN Membership Manager Administratorrole (esn_membership_manager_admin). - Registers the OAuth2 scope (
omnia_scanner_esn_membership_manager/esn_scanner) for the Scanner app.
Once the module is enabled, you must configure both Omnia and ESN Membership Manager before it can be used.
Shared credentials—such as your Organisation Name, Logo, Stripe Secret Key, Google Service Account JSON, Google Wallet Issuer ID, and Apple Team ID—are managed centrally in Omnia Settings. Configure these before enabling the corresponding integrations in ESN Membership Manager.
Assign the appropriate permissions to your user roles (e.g., Administrator, Membership Officer, OC Members).
- 👉 See Roles and Permissions for details.
Configure the basic module settings, including feature switches, Pass Scheme Name, email sender, Administrator Email Address, and Guest Pass limits.
-
Path:
/admin/config/system/esn-membership-manager - 👉 See General Settings for the full configuration guide.
The module requires Stripe to be configured for payment processing. Other integrations (Didit, Weeztix, Google Sheets, Google Wallet, Apple Wallet, Google/Apple Authentication) are optional.
- 👉 See Stripe Integration to set up your webhook secret and product Price IDs.
Ensure Drupal Cron runs regularly (e.g., daily) so the built-in GDPR Retention Cron automatically purges expired documents and anonymises old applications.
If you encounter errors related to missing classes (e.g., Omnia, Stripe, TCPDF, or Google libraries), ensure you have
run composer install from your Drupal project root and cleared Drupal's cache (drush cr).
Ensure the web server user has write permissions to the parent directory of your Drupal web root so
../../private/esn_membership_manager_storage can be created and written to.
After updating the module code in the future, always run database updates and clear caches to apply any schema or entity changes:
drush updb -y
drush cr