CoolCMS API

AccountAnonymizationManager
in package
implements AccountAnonymizationStepInterface

FinalYes

Base share of anonymizing a deleted account: - comments and reviews stay, but the author name copied into them at posting time is replaced by "Deleted user" and the copied e-mail is cleared (templates print the copy directly; the reviewer e-mail `user_email` of a review is not mapped by the entity — raw UPDATE), - the newsletter address of the account e-mail is deleted (unsubscribed; it has no user FK, the e-mail is the only link — hence it runs before the account e-mail is overwritten).

Table of Contents

Interfaces

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

Properties

$commentManager  : CommentManager
$newsletterAddressManager  : NewsletterAddressManager
$ratingManager  : RatingManager

Methods

__construct()  : mixed
anonymizeUser()  : array<string, int>
assertSuccess()  : void
findIds()  : 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)

findIds()

private findIds(array<string|int, mixed> $entities) : array<int, int>
Parameters
$entities : array<string|int, mixed>
Return values
array<int, int>
On this page

Search results