- 🇺🇸United States euk
There is a module that attempts to solve this - https://www.drupal.org/project/user_delete_reassign → , but it was not updated for a long time, has a few bugs reported and doesn't work for me with the view bulk op out of the box. Another considerations to be made - this should work with Workbench Access and similar modules. For that there should be a hook/event and validation system which would allow to alter username suggestions or validate new owner content access rights.
- First commit to issue fork.
- Merge request !104886066824 - Added ability for admin to specify which account content can be assigned → (Open) created by Unnamed author
- 🇮🇳India ramprassad
I have created an MR 10488 for the changes related to this functionality. Please check
- 🇺🇸United States euk
@ramprassad, you bit me to it =) Though I am currently working on creating a D10 patch, and there are a few differences anyway. I looked at your PR and left a couple of comments. I also have a few suggestions:
- I do not recommend storing a default UID for this new cancellation method in the configs: developers then have to maintain this config, while most of the time admins probably want to reassign content to different users (based on my experience with medium to large sites), therefore making this default setting irrelevant and annoying.
- Added to the above - if the account matching the default UID has been disabled/deleted - you would have to update the config and also might have to deal with consequences of assigning content to deleted/disabled users.
- When reassigning content, you should account for editorial permissions - is the new user able to edit content? The simplest way to check that the content belonging to the account being deleted can be edited by the new users is to compare roles and make necessary adjustment to the account suggestions in the entity autocomplete.
- Same as above should be also considered for multiple accounts being deleted in bulk - here you'd want the new user have all the roles the deleted users had, or let the admins know what the consequences are if there are some mismatches.
- There should be a hook/event allowing to alter user selection - some modules like Workbench Access have their own content permissions model and need to be able to intervene.
I am including the above into my D10 patch. Hopefully will have it by EOD.
- 🇺🇸United States euk
While D10.3.x. merge fails (specifically - unit test, though it shows 100% success rate), here is the patch for D10.3.x - should work with 10.3.6 and up, till 10.3.10 at least.