delete_entity function fails
|Reported by:||kevinjardine||Owned by:|
A client reported that deleting a user failed. An investigation suggests that this is because the user owned disabled entities.
A look at the core delete_entity() function suggests a reason - the entities to delete are generated using raw SQL but this then recurses to individual get_entity() calls. The raw SQL returns the disabled entities but the get_entity calls are unable to access the disabled content and the overall delete fails.
Suggested fix - add: