This extension allows users increasing control over their data.
flarum/core
-v1.8.3
or higherPHP
-8.0
or higher
Install manually with composer:
composer require flarum/gdpr:@beta
All forum users now have a Personal Data
section within their account settings page:
From here, users may self-service export their data from the forum, or start an erasure request. Erasure requests are queued up for admins/moderators to process. Any unprocessed requests that are still pending after 30 days will be processed automatically using the configured default method (Deletion or Anonymization).
If your forum runs multiple queues, ie low
and high
, you may specify which queue jobs for this extension are run on in your skeleton's extend.php
file:
Flarum\Gdpr\Jobs\GdprJob::$onQueue = 'low';
return [
... your current extenders,
];
You can easily register a new Data type, remove an existing Data type, or exclude specific columns from the user table during export by leveraging the Flarum\Gdpr\Extend\UserData
extender. Ensure that you wrap the GDPR extender in a conditional extend, so that forum owners can choose if they want to enable GDPR functionality or not. This functionality requires flarum/core
v1.8.3
or higher, so that should be set as your extension's minimum requirement.
Your data type class should implement the Flarum\Gdpr\Contracts\DataType
:
<?php
use Flarum\Gdpr\Extend\UserData;
use Flarum\Extend;
return [
(new Extend\Conditional())
->whenExtensionEnabled('blomstra-gdpr', fn () => [
(new UserData())
->addType(Your\Own\DataType::class),
... other conditional extenders as required ...
]),
];
The implementation you create needs a export method, it will receive a ZipArchive resource. You can use that to add any strings or actual files to the archive. Make sure to properly name the file and always prefix it with your extension slug (blomstra-something-filename).
If for any reason you want to exclude a certain DataType from the export:
use Flarum\Gdpr\Extend\UserData;
use Flarum\Extend;
return [
(new Extend\Conditional())
->whenExtensionEnabled('flarum-gdpr', fn () => [
(new UserData())
->removeType(Your\Own\DataType::class),
... other conditional extenders as required ...
]),
];
use Flarum\Gdpr\Extend\UserData;
return [
(new Extend\Conditional())
->whenExtensionEnabled('flarum-gdpr', fn () => [
(new UserData())
->removeUserColumn('column_name') // For a single column
->removeUserColumns(['column1', 'column2']), // For multiple columns
... other conditional extenders as required ...
]),
];
These are the known extensions which offer GDPR data integration with this extension. Don't see a required extension listed? Contact the author to request it
- 2FA, since
1.0.9
- Boring Avatars, since
1.0.0
- FoF Ban IPs, since
1.1.0
- FoF Drafts, since
1.2.8
- FoF Follow Tags, since
1.2.2
- FoF Terms, since
1.3.0
- FoF Upload, since
1.4.4
- Follow Users, since
1.4.1
- Generating the zip archive can be pushed to queue functionality. This is exceptionally important on larger communities and with more extensions that work with the gdpr extension to allow data exports.