AdvertOwnerContactScrubRepositoryTrait
Anonymization of a deleted account — contact data of the user's own adverts (Bazaar adverts, Comcat company profiles; owner = `insert_user_id`), whatever state the advert is in: - `adverts.email` → '' (the column is not NULL), - the values of the contact parameters ({@see ContactParameter}) are deleted from the `EAV` table.
Set-based raw DBAL (two statements, both idempotent — a repeated run changes nothing), so the
manager has to bump the cache tags itself. Table names are derived from the ORM mapping of the
advert entity (prefix cms_mod_<module>_), one code for both modules — the same convention as
AdvertHardDeleteRepositoryTrait. Other users' adverts and adverts without an account
(insert_user_id NULL) never match.
Tags
Table of Contents
Methods
- scrubOwnerContacts() : array{emailsCleared: int, contactValuesDeleted: int}
Methods
scrubOwnerContacts()
public
scrubOwnerContacts(int $userId) : array{emailsCleared: int, contactValuesDeleted: int}
Parameters
- $userId : int