Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
#3479606: Rename js folder "libraries" to "js"
#3479613: Make 4.x the default branch in GitLab Settings > Branches
#3479609: Regression: Unchecking a role entirely hides the parent details fieldset
#3434268: Drupal 11 compatible version + move rules integration to a new submodule + phpcs, eslint, phpstan and phpcs fixes
#3426271: Apply dependency injection where possible
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.
#3321049: Replace README.txt with README.md
#3309899: Use the ModuleHandlerInterface instead of the ModuleHandler concrete implementation
#3309311: User is logged out when user profile was updated by an admin
WARNING: Requires a Rules version 8.x-3.0-alpha7 or lower if you use the Rules integration.
Updated tests
#3245828: Show all roles on profile, not just those that expire
#3245817: Show "friendly" name for role instead of machine name
#3248606: Fix missing config schema definitions
#3258159: Role expiration doesn't set for role which was added automatically during registration
#3251200: writeRecord API method always deletes session
#3258020: Role expire data appears and dissappears when another module interacts (password policy)
#3193800: RoleExpiresEvent should not depend on Rules module
#3203077: Create additional permissions
#3213495: Highlight relative expiry dates can be set using rules action
Moved Role Expire configuration form to "Configuration > People > Role expire"
Adopted semantic versioning. No major changes since 8.x-1.8
#3168571: User is logged out on role_expire deletion (make it optional)
#3168813: Losing expiration data when combined with RoleAssign and Role Delegation
#3137887: PHP notice on registration page
#3143191: Drupal 9 Deprecated Code Report
#3152133: Create pseudo-field for role expire on user display
#3142555: Provide an option to disable RE for selected roles
Code cleanup using PHP CodeSniffer
Remove Role Expire deprecated API calls
Remove duplicated code on configuration form
#3123747: Default duration should be saved in config
WARNING: If you use old API calls, please use new service instead.
IMPORTANT: If upgrading from previous version, run update.php script.
#3083481: Remove unused variable
#3029593: Support role assignment modules
Remove another unused variable
Remove usage of Deprecated REQUEST_TIME
Remove two unused use statements
Update deprecated tags in old API calls
Updated PHPDoc for API calls
Simplify call to writeRecord in processDefaultRoleDurationForUser API call
#3061945: Fix PHP Notice on views using Role expire fields
#3021274: End sessions when expiring roles
#3080861: Exclude authenticated and anonymous role while assigning new role after expiration
Added new Views field "Role expiration all data" which displays all expiration data
Fixed views fields "Role expiration date/time" and "Role expiration role" to avoid row duplicates
#3080679: End sessions when expiring roles
#3080861: Exclude authenticated and anonymous role while assigning new role after expiration
Fixed views fields "Role expiration date/time" and "Role expiration role" to avoid row duplicates
Tests: Moved helper functions to a Trait
Upgrading from a previous version
A lot of changes have been done on views plugins to fix a bug of duplicated rows under certain circumstances. You may need to re-save your Role expire fields or delete & re-add them on your Views.
README improvement
Added tests
Source code improvements (dependency injection)
#3030519: Assign default expiration for new role created on cron expiry
Remove usage of deprecated drupal_set_message method
Improved README file
#2406975: Remove 'module' key in hook_rules_action_info()
#2891810, #1280450, #1293846: More flexibility for default durations (recovered lost feature of 7.x-1.0-beta2)
#1899606: Support role assignment modules
New functionality:
This release of role_expire addresses the issue at http://drupal.org/node/1280450 and enables you to set the default duration for a role to be hours, weeks, years, as well as days. Now, when you choose "Edit role" on http://www.example.com/admin/user/roles, you can supply any positive time duration. Examples: 12 hours, 1 day, 3 days, 4 weeks, 3 months, 1 year. Leave blank for no default duration. (If you speak php, this value may be any strtotime-compatible relative form.)
IMPORTANT: If upgrading from a previous version of role_expire, you must run update.php before using this module.
This release of role_expire addresses the issue at http://drupal.org/node/926248 and enables you to set the default duration for a role to be hours, weeks, years, as well as days. Now, when you choose "Edit role" on http://www.example.com/admin/user/roles, you can supply any positive time duration. Examples: 12 hours, 1 day, 3 days, 4 weeks, 3 months, 1 year. Leave blank for no default duration.
This is still a dev release. Not all functionality is working. There is no migrate, rules or views functionality. The user edit form works now and you can edit roles. Essentially this module seems to work if you use the basic functionality i.e. role expiry, but none of the integration or simpletests work yet
#26 on http://drupal.org/node/561270 allowed me to see that it is the user actually making the role expire time vanish rather than an administrative user.
Users can now be added with role expire from the admin interface.
The install/update function will also clean rogue rows from the role_expire table. Users with large installations, for example more than 2000 users may want to run the update in a "drush updatedb"
This simple release fixes http://drupal.org/node/561270 (Expiration date vanishes if changes are made on other tabs). There are no schema changes or update functions to run with this update.
This release adds the ability to set a default expiry duration to roles.
A potential use case for this is as follows:
1) Go add a role called "Survey taken".
2) Hit edit role and supply 7 as a default duration.
.......
4) User registers
2) User gets a page offering free access in return for a survey.
3) After the survey is taken the role "Survey taken" is given to the user.
4) The Survey taken role has a default expiry length of 7 days, so the role will stay active on the user for 7 days from now.