Skip to content

Grant new user role after 3 conditions are met

Version v2

Purpose

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.

Dependencies

  • config
    • user.role.moderator
  • module
    • eca_base
    • eca_content
    • user

Used plugins

Events

Conditions

Actions

Changelog

v1

Initial release

v2

Replace role content_moderator with new role moderator to avoid extra dependencies that are derived from permissions