Create custom fields for user.
Create a user account and fill custom fields.
Submit anonymization request.
Customfields will be anonymized
data is not anonymized
Joomla! 3.9.12
The following solution would fix the problem:
plugin:
plugins\privacy\user\user.php
new function:
public function anonimizecustomfields($userid){
// JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
$userfields = FieldsHelper::getFields('com_users.user', $userid, true);
$model = JModelLegacy::getInstance('Field', 'FieldsModel', array('ignore_request' => true));
foreach($userfields as $userfield) {
$model->setFieldValue($userfield->id, $userid, '----');
}
}
at the end function:
onPrivacyRemoveData
$this->anonimizecustomfields($user->id);
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-12-22 00:32:09 |
Closed_By | ⇒ | Quy |
Related RFC #25849.