PHPackages                             flarum/gdpr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. flarum/gdpr

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

flarum/gdpr
===========

Features for GDPR, PII management

v1.8.2(5mo ago)1344.5k↓11%7[2 PRs](https://github.com/flarum/gdpr/pulls)14MITPHPPHP 8.\*CI passing

Since Nov 4Pushed 2w ago5 watchersCompare

[ Source](https://github.com/flarum/gdpr)[ Packagist](https://packagist.org/packages/flarum/gdpr)[ GitHub Sponsors](https://github.com/flarum)[ Fund](https://opencollective.com/flarum)[ RSS](/packages/flarum-gdpr/feed)WikiDiscussions 2.x Synced 2w ago

READMEChangelog (10)Dependencies (9)Versions (42)Used By (14)

GDPR or PII management
======================

[](#gdpr-or-pii-management)

This extension allows users increasing control over their data.

### Requirements

[](#requirements)

- `flarum/core` - `v2.0` or higher
- `PHP` - `8.3` or higher

### Installation or update

[](#installation-or-update)

Install manually with composer:

```
composer require flarum/gdpr:^2.0.0
```

### Use

[](#use)

All forum users now have a `Personal Data` section within their account settings page:

[![image](https://private-user-images.githubusercontent.com/16573496/276151391-4e469956-709f-4ba3-a5fe-d3fcb0401b73.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODU1NDI5OTIsIm5iZiI6MTc4NTU0MjY5MiwicGF0aCI6Ii8xNjU3MzQ5Ni8yNzYxNTEzOTEtNGU0Njk5NTYtNzA5Zi00YmEzLWE1ZmUtZDNmY2IwNDAxYjczLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1IT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zBiMWUwNjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.crIqoW7l0BH2V5tRywHpvK0PxznNfJAabw4ASXvYNWM)

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).

#### Specifying which queue to use

[](#specifying-which-queue-to-use)

If your forum runs multiple queues, ie `low` and `high`, you may route this extension's jobs onto a specific queue with the core `Queue` extender in your `extend.php` file:

```
use Flarum\Extend;
use Flarum\Gdpr\Jobs\GdprJob;

return [
    // Routes every GDPR job (erasures and exports) — both extend GdprJob.
    (new Extend\Queue())
        ->route(GdprJob::class, 'low'),

    // ... your current extenders,
];
```

### For developers

[](#for-developers)

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` `v2.0` or higher, so that should be set as your extension's minimum requirement.

#### Registering a new Data Type:

[](#registering-a-new-data-type)

Your data type class should implement the `Flarum\Gdpr\Contracts\DataType`:

```
