Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Role Expire

Security covered Under active development 2,062 sites

This module allows administrators to set expiration dates for user roles, automatically removing roles once they expire. It's useful for managing temporary access, such as magazine subscriptions, and can also set default expiration durations for roles.

Role Expire is a simple module that allows administrators to set and control expiry dates of user roles. A common use case for this module is to implement magazine style subscriptions where somebody purchases or receives access for a fixed period of time.

At the moment it implements the following functionality:

  • Selecting a role (or roles) on user_profile_form triggers a textfield (or textfields) where admins can enter expiry date for selected items.
  • Defined expiry dates are displayed on user's profile (visible only for owners of the profile or users with proper permissions). This can be altered using standard theme_ or hook_user() functions.
  • Role expiry dates are controlled by Cron, so it automatically removes any expired roles.
  • Simple API is provided to set, clear or retrieve expiry dates for given roles and users.
  • Views module handlers are provided for displaying, sorting and filtering expiry dates inside views (per role).
  • Set default expiry duration (12 hours, 1 day, 3 days, 4 weeks, 3 months, 1 year) for each role in the edit role screen, so that on receiving a role a user will keep it for the stored time span. The expiry duration can be a strtotime-compatible string (like "last day of this month"). Handy for Subscriptions or temporary access.
  • Migrate module support for migrating roles into your Drupal site.
  • If you want to keep role history alongside look at role watchdog module
  • Rules module integration
  • Support for Role Delegation module.
  • Support for RoleAssign modules.
  • You can set a default role when each role expires.
  • End sessions when expiring roles
  • Provide an option to disable RE for selected roles [not available on D7]

Branches

  1. Branch 4.x: Drupal 11 compatible. Using Rules version 4.0.0 or greater is recommended if you use the Rules integration that is now under "Role Expire Rules" submodule.
  2. Branch 3.x: Drupal 10 compatible. Requires a Rules version 8.x-3.0-alpha8 or greater if you use the Rules integration. No further development.
  3. Branch 2.x: Drupal 8 and 9 compatible. Requires a Rules version 8.x-3.0-alpha7 or lower if you use the Rules integration. No further development.
Drupal 10–11

Ask your assistant about Role Expire

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
9
Tracked since
Jul 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
4.1.1 Stable 10–11 Oct 31, 2024
4.1.0 Stable 10–11 Oct 1, 2024
4.0.2 Stable 10–11 Sep 23, 2024
4.0.1 Stable 10–11 Aug 17, 2024
4.0.0 Stable 10–11 Aug 14, 2024
4.x-dev Dev 10–11 Aug 14, 2024
2.0.5 Stable 8–9 Nov 7, 2023
3.0.2 Stable 8–10 Nov 7, 2023
3.0.1 Stable 8–10 Jul 18, 2023