CoolCMS API

AccountAnonymizationManager
in package
implements AccountAnonymizationStepInterface

FinalYes

Comcat step of anonymizing a deleted account.

The user's company profiles are deactivated (not deleted), reindexed and the category counts are recounted. Watchdogs are deleted, otherwise they would keep e-mailing the original address.

NOTE: the contact data of a company profile (e-mail, phone, street) are not scrubbed. They are the company's business contact, not the account's personal data, and the profile is hidden anyway. Bazaar adverts are scrubbed (see the Bazaar step).

Table of Contents

Interfaces

AccountAnonymizationStepInterface
One module's share of anonymizing a deleted account.

Properties

$advertManager  : AdvertManager
$categoryManager  : CategoryManager
$esDocumentSource  : AdvertDocumentSource
$esIndexer  : EsEntityIndexer
$watchdogManager  : WatchdogManager

Methods

__construct()  : mixed
anonymizeUser()  : array<string, int>
assertSuccess()  : void
findActiveAdvertIds()  : array<int, int>

Properties

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

Return values
array<string, int> —

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

findActiveAdvertIds()

private findActiveAdvertIds(int $userId) : array<int, int>
Parameters
$userId : int
Return values
array<int, int>
On this page

Search results