Membership Manager

This project is not covered by Drupal’s security advisory policy.

Membership Manager provides a flexible system for managing user memberships
and subscriptions in Drupal. The module focuses on membership lifecycle,
access control, and feature entitlements, while deliberately staying
payment-agnostic. It works equally well for free and paid memberships,
SaaS platforms, and content-driven websites. Payments, billing, and
invoicing are left to external systems such as Drupal Commerce, Stripe,
or custom integrations.

Features

  • Membership plans (free, paid, trial) as config entities
  • User memberships as content entities with full lifecycle: active, pending, trial, expired, canceled
  • Time-based expiration with configurable grace periods
  • Cron-based expiry processing via Drupal Queue API
  • Route-level access control via _membership_active requirement
  • Feature/entitlement checks per plan
  • Drupal role synchronisation on activation and expiry
  • Symfony lifecycle events: activated, expired, canceled, renewed
  • Payment-agnostic — no hard dependency on Commerce or any billing system
  • Drupal 10 and 11 compatible

Architecture

  • Business logic in MembershipManagerService
  • Thin controllers — lifecycle operations via POST routes with CSRF protection
  • Access via MembershipAccessChecker and MembershipAccessControlHandler
  • Custom storage class with domain-specific query helpers

Access control

Protect any route by adding _membership_active: 'TRUE' to its
requirements. Scope by feature key with
_membership_active: 'feature:api_access'.
Access decisions are cacheable and respect Drupal cache contexts.

Integration

Designed to integrate with Drupal Commerce, Stripe, PayPal, ECA, Rules,
and custom SaaS backends. Call MembershipManagerService::assign()
after any successful payment event.

Use cases

  • Paid or free content access
  • SaaS account plans
  • Membership portals
  • Feature-based subscriptions

Requirements

  • Drupal 10.2+ or Drupal 11
  • PHP 8.2+
  • User module (core)

Installation

  1. composer require drupal/membership_manager
  2. drush en membership_manager
  3. Visit /admin/membership to create your first plan.

Roadmap

  • Views integration for membership lists
  • Drupal Commerce submodule
  • Drush commands for bulk operations
  • REST / JSON:API support

Maintainers

Dmytro Porokhnya (darkdim)

Supporting organizations: 

Project information

Releases