Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Deleting a user destroys their entries instead of assigning them to selected user #5838
We're in the middle of updating a (large) website of one of our clients from Craft 2 to 3. While testing, our client tried to delete one of the user accounts. She selected another account as the assignee for the deleted user's entries.
We expected the entries to be assigned to this other user, but instead they disappeared altogether. As if the
I've reproduced this multiple times, and it seems to happen when the users involved are assigned to a specific user group which are not admins. In some other cases it worked normally though. I couldn't really pinpoint when or what causes this exact behaviour, but it can potentially lead to them destroying a lot of valuable content by accident - So I think it's worth checking out.
No custom code regarding CMS users was added to this project, so I suspect it's something in Craft itself — but I may be wrong about that.
Steps to reproduce
There's some more plugins installed, but I don't think they can possibly affect this issue.
Thanks in advance for checking this out!
I've ran some more tests, and it seems like this is only happening when triggering the
EDIT: our client tells me they started the deletion from the user's detail page. So this doesn't seem very consistent.
Sorry about this. I was able to reproduce when deleting a user from the Users index page, however the Edit User page is working as expected for me.
Worth noting that the user and their content would have only been soft-deleted, so you should be able to restore the deleted user and their entries, by selecting the “Trashed” status on the Users and Entries index pages.