User Absence and Substitution lets users record when they are absent, and lets designated managers give another user a role for a limited time to cover for them. The role is added automatically when the substitution period starts and
removed when it ends. Managers never need the administer users permission.
The substitution part works much like Role Delegation: managers assign selected roles without administer users. The difference is that every assignment here has a start and an end
date, and substitutions can be linked to absences. If you only need permanent delegated role assignments, use Role Delegation instead.
The module is meant for sites where several roles work together on a process. Each role owns part of the work, and at least one person of every role must be available to complete it. If everyone holding a role is absent, the process stalls. With this
module a team lead can assign that role to a colleague for exactly the duration of the absence. It is granted and revoked automatically.
Features
- Absences: users record their own absences (start and end date). Managers can record absences for anyone.
- Time-limited substitution roles: managers assign a role to a user for a period. The role is granted at the start and revoked at the end.
- No
administer usersneeded: substitutions are managed through their own forms. Managers never get access to user account edit forms. - Allowed roles: only roles that a site administrator has marked as substitutable can be assigned. Administrator roles and roles with a restricted permission can never be assigned.
- Safe revocation: a role the user already had before the substitution is never removed. If substitutions for the same role overlap, the role is kept until the last one ends.
- Coverage check: a block and form hints show roles that have nobody available in an upcoming period.
- Views integration: both absences and substitutions are fieldable content entities with full Views support, including relationships from users.
- Day or date/time granularity, configurable.
- Drush commands to process the schedule and report coverage.
- Events for activation and expiry, so you can attach notifications (for example with ECA).
Requirements
- Drupal 11.1 or later, or Drupal 12
- PHP 8.3 or later
No modules outside of Drupal core are required. The module depends on the core User and Options modules.
Recommended modules
- Views (core): enables the shipped default listings and custom listings.
- Field Permissions: if you add sensitive fields to absences (for example a reason), restrict who can see them.
- ECA: send notifications when a substitution starts or ends.
- Ultimate Cron: run the module's cron task more often than the rest of cron.
Similar modules
- Role Delegation does almost the same as the substitution part of this module: non-administrators assign specific roles without
administer users. Its assignments are permanent,
though. There is no start or end date. - Role Expire adds an expiry date to role assignments and works together with Role Delegation. It has no scheduled start date, no absences and no coverage check. A scheduled start has been
requested, but not added (#683252, #1824262).
User Absence and Substitution combines both ideas (delegated, time-limited role assignment with a start and an end date) and connects them to absences and role coverage, so the question "who covers for whom, and when" is answered in one place.
AI disclosure
This module was developed with the help of an AI coding assistant. The maintainer reviewed and tested everything, and is therefor responsible for the code and documentation in line with the href="https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...">Drupal policy on the use of AI.
Ask your assistant about User Absence and Substitution
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
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | 11 | PHP 8.3 | Nov 18, 2026 |