Current Behavior
When GDPR Deleting a user, posts are bulk deleted like this:
|
public function delete(): void |
|
{ |
|
Post::query()->where('user_id', $this->user->id)->delete(); |
|
} |
Bulk deletion like this skips over the events needed to keep the discussions in sync and retain data integrity
Steps to Reproduce
- Create a new test user
- Start a few discussions, reply to some other discussions
- Request GDPR Erasure as that testing user
- Confirm the erasure request by that testing user
- Process the erasure request as an admin
Expected Behavior
Flarum Events should be dispatched (dispatchEventsFor()) which in turn would get listened to by the DiscussionMetadataUpdater.
Screenshots
No response
Environment
- Flarum version: 1.8.17
- Website URL: n.a.
- Webserver: n.a.
- Hosting environment: n.a.
- PHP version: 8.3.32
- Database 10.11.15 MariaDB
- Browser: n.a.
Output of php flarum info
No response
Possible Solution
No response
Additional Context
I didn't test this locally against the 2.x version, however the implementation is the same there. Changing this behaviour is a technically a breaking change and ideally is done just for the 2.x branch, before 2.0.0 stable is released.
Current Behavior
When GDPR Deleting a user, posts are bulk deleted like this:
framework/extensions/gdpr/src/Data/Posts.php
Lines 54 to 57 in f49072a
Bulk deletion like this skips over the events needed to keep the discussions in sync and retain data integrity
Steps to Reproduce
Expected Behavior
Flarum Events should be dispatched (
dispatchEventsFor()) which in turn would get listened to by theDiscussionMetadataUpdater.Screenshots
No response
Environment
Output of
php flarum infoNo response
Possible Solution
No response
Additional Context
I didn't test this locally against the 2.x version, however the implementation is the same there. Changing this behaviour is a technically a breaking change and ideally is done just for the 2.x branch, before 2.0.0 stable is released.