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.
Make sure that the module behaves accordingly when a role that has been selected to be assigned automatically or exposed to a user is modified or deleted.
Comments
Comment #1
cyberswat CreditAttribution: cyberswat commentedUpdating title to be more use case like
Comment #2
Taxoman CreditAttribution: Taxoman commentedComment #3
mike.davis CreditAttribution: mike.davis commentedWhat should happen in these cases?
I might be missing something but if a role is deleted then any users that are assigned to that role are no longer assigned.
Also if this role has been setup to be auto assigned then it would no longer get assigned. Similarly for user choice, the deleted role wouldn't be on the list.
Is it just that autoassognrole needs to recognise the removal of roles better and provide warning message to an admin, either on deleting of a role (if possible, I haven't looked) or within the autoassignrole admin screens to warn that a particular role registration by page won't actually do anything because the role no longer exists?
Comment #4
mike.davis CreditAttribution: mike.davis commentedI have just tested this with a role set to be auto assigned on standard registration as well as on a path based registration (based upon patch from #971320: Administrator configures registration paths, each with customised role assignments). Having created a new user from the standard registration as well as from path based registration both users are assigned to this role. When the role is then deleted, the relevant users are no longer assigned to this role. On registering a new user from both the standard and path based registration these work fine without any errors or issues.
@cyberswat, what is the use case for this, as it seems to work correctly?
Comment #5
mike.davis CreditAttribution: mike.davis commentedJust updated status as need more information on this one