Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I've created a rule to send an email when ever a user role is changed. The issue I'm having is that the rule runs every time the user profile is saved even if the user saving the profile does not have the rights to update roles. This means every time the user updates their profile they are sent an email. How can I set the rule so that it only runs if the role is actually changed?
Thank-you,
Heather
Comments
Comment #1
Rosehips CreditAttribution: Rosehips commentedAfter submitting the request for assistance, I found the solution. Please disregard.
Comment #2
julou CreditAttribution: julou commentedHello,
I dare to reopen this issue since I have exactly the same problem and did not manage to fix it by myself :(
I use the following condition: "NOT Data comparison" with parameter: Data to compare: [account:roles], Data value: [account-unchanged:roles]. You find the rule export below.
I suspect that the problem might be due to the comparison of lists. But maybe the correct way to achieve this is to use a completely different route. Any help would be greatly appreciated.
Regards,
Thomas
Comment #3
TR CreditAttribution: TR commentedDuplicate of #2471433: Rule to send an email when role is changed