Apply for role module is doing modification to user role, however, it does not follows 'Drupal way' of user update process. Hence user update event - update & after_update are not fired.
Attached is the patch to add in the user update event when the user's roles are modified.
After which you can make use of module such as workflow_ng to create trigger when a user role changed.
| Comment | File | Size | Author |
|---|---|---|---|
| apply_for_role_miss_user_invoke.patch | 3.38 KB | ckng |
Comments
Comment #1
ckngJust in case someone needed this.
A sample workflow_ng rule to trigger when a role is approved.
For deletion or revoked rules, just clone the same rule and toggle the Negate of both conditions.
Comment #2
tborrome commentedThanks, I'm about to try this out as I need this functionality.
do you have a workflow_ng rule for email to be sent to admin when a user applies for a role?
is this possible with applyforrole with workflow-ng?
Comment #3
Soren Jones commentedDoes #351916: Module should not directly manipulate users_roles table address this issue? If so it's been backported to 5 and is available in 5.x-1.8.
Comment #4
ckngYes, #351916: Module should not directly manipulate users_roles table solved the same problem.