drupal-eca-recipe/eca_lib_0007

ECA Feature Demo

Installs: 28

Dependents: 0

Suggesters: 0

Security: 0

Type:drupal-recipe

dev-main 2024-08-09 09:54 UTC

This package is auto-updated.

Last update: 2024-11-09 10:18:42 UTC


README

ID: eca_lib_0007

This model demonstrates a number of smart features around user accounts:

  1. When a user registers themselves or gets created by an existing user, then all existing users with the admin role get informed by email. If the current user has the admin role, a message also get displayed with a link to the mailhog application to review the emails.
  2. When a user logs in, a number of actions applies: depending on their role, different redirect destinations will be used after login. Also, the assigment of the internal user role gets executed, see below.
  3. When a user gets updated, the assigment of the internal user role also gets executed.

The assignment of the internal user role assigns that role to the current user if their email domain contains @example.com and removes it otherwise. It does that only if the situation had changed and also displays an according message on screen.

Installation

composer require drupal-eca-recipe/eca_lib_0007
cd web && php core/scripts/drupal recipe ../vendor/drupal-eca-recipe/eca_lib_0007