CoolCMS API

AccountAnonymizationManager
in package
implements AccountAnonymizationStepInterface

FinalYes

Bazaar share of anonymizing a deleted account: - the user's adverts are deactivated (not deleted — the owner of a deleted account cannot restore them, but the administration still sees them), reindexed and the category counts recounted, - the contact data of all the user's own adverts (any state) are deleted: `email` → '' and the values of the contact parameters (e-mail, phone, street — see {@see \App\Core\Base\Shared\Shared\Models\Entities\ContactParameter}); the fulltext document carries no contact, so no reindex for it, - watchdogs (they would keep e-mailing the original address) and followed adverts are deleted.

Table of Contents

Interfaces

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

Properties

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

Methods

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

Properties

Methods

__construct()

public __construct(AdvertManager $advertManager, WatchdogManager $watchdogManager, AdvertFollowerManager $advertFollowerManager, CategoryManager $categoryManager, EsEntityIndexer $esIndexer, AdvertDocumentSource $esDocumentSource) : mixed
Parameters
$advertManager : AdvertManager
$watchdogManager : WatchdogManager
$advertFollowerManager : AdvertFollowerManager
$categoryManager : CategoryManager
$esIndexer : EsEntityIndexer
$esDocumentSource : AdvertDocumentSource

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