CoolCMS API

AccountAnonymizationStepInterface

One module's share of anonymizing a deleted account.

The System module owns cms_system_users; the other modules own the data that refers to the account (adverts, watchdogs, signed posts, newsletter address). Each module implements this on its Api side (manager tier, no bridge, no RBAC — the cron runs without an identity) and AccountDeletionManager collects every implementation through DI, so a new module joins by adding a class, not by editing the System module.

Steps run before the account row itself is wiped (the original e-mail is still known) and must be idempotent — a failed run is retried by the next cron run.

Table of Contents

Methods

anonymizeUser()  : array<string, int>

Methods

anonymizeUser()

public anonymizeUser(int $userId, string $originalEmail, string $deletedLabel) : array<string, int>
Parameters
$userId : int
$originalEmail : string

e-mail of the account before anonymization ('' = none)

$deletedLabel : string

translated "Deleted user" written over copied author names

Tags
throws
Throwable

a failure aborts the anonymization of this account (retried next run)

Return values
array<string, int> —

what was changed, for the audit log (e.g. bazaarAdvertsDeactivated => 2)

On this page

Search results