PHP code example of flarum / gdpr

1. Go to this page and download the library: Download flarum/gdpr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flarum / gdpr example snippets


Flarum\Gdpr\Jobs\GdprJob::$onQueue = 'low';

return [
    ... your current extenders,
];



use Flarum\Gdpr\Extend\UserData;
use Flarum\Extend;

return [
    (new Extend\Conditional())
        ->whenExtensionEnabled('flarum-gdpr', fn () => [
            (new UserData())
                ->addType(Your\Own\DataType::class),

            ... other conditional extenders as 

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 

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