drupal-eca-recipe / eca_lib_0026
Adds a role to a user once three stored conditions are all met, and removes it again as soon as any of them stops being true.
Package info
gitlab.lakedrops.com/drupal/recipes/eca_lib_0026
Type:drupal-recipe
pkg:composer/drupal-eca-recipe/eca_lib_0026
3.2.8
2026-09-01 14:36 UTC
Requires
- drupal/eca: *
- drupal/modeler_api: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
ID: eca_lib_0026
This model automatically adds or removes a role from a user, when this gets updated, depending upon 3 conditions that are stored with the user entity. Only if all 3 conditions are met, the role gets added. In all other cases the role gets removed.
The creation of this module was recorded and the video with additional explanations can be watched here.
Installation
## Import recipe
composer require drupal-eca-recipe/eca_lib_0026
# Apply recipe with Drush (requires version 13 or later):
drush recipe ../recipes/eca_lib_0026
# Apply recipe without Drush:
cd web && php core/scripts/drupal recipe ../recipes/eca_lib_0026
# Rebuilding caches is optional, sometimes required:
drush cr