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.
If a role is assigned to a user with the role delegation module, no e-mail notification is sent out to that user. I have looked through the code myself but cannot figure out which part is analysing the change of roles in the Drupal system. Any help appreciated, thanks.
Comments
Comment #1
rfayUnfortunately, the role_delegation module does direct access to the database instead of using the drupal apis.
Here is the code from role_delegation:
My belief is that the correct way to accomplish this task (and the way used by other modules) is to use user_save(). That way modules like this one (role_change_notify) can listen on the hook (hook_user) and take actions.
Please file this bug against the role_delegation module. I think the information given here is enough to describe what change should be made. I'll be happy to help out.
-Randy
Comment #2
rfayI rolled patches for role_delegation for drupal5 (#341162: Module should use user_save instead of directly accessing drupal database (drupal5 patch)) and for drupal6 (#341165: Module should use user_save instead of directly accessing drupal database (drupal6 patch)) on this, so perhaps that will get into the module. In the meantime, you can patch role_delegation with these patches.
Please note that the mentioned patches are for Role Delegation, not for this module. They will not apply to role_change_notify.
Comment #3
rfayWon't (can't) fix, but hoping for the update in role delegation.
Comment #4
rfayThis has apparently been fixed (the patches I submitted have been committed) in the latest releases. (6.x-1.1 and 5.x-1.2) of role_delegation