BConnect POS - Reference PHP

AnonymizeUsersController extends AbstractController
in package

API endpoint to anonymize POS users tied to points of sale.

Called by b-connect-business when a company account is deleted.

Table of Contents

Properties

$entityManager  : EntityManagerInterface
$logger  : LoggerInterface

Methods

__construct()  : mixed
anonymizeUsersByPointOfSale()  : JsonResponse
Anonymizes all users tied to a list of pointOfSaleIds.
anonymizeUser()  : void
Anonymizes the PII data of a POS user.

Properties

Methods

__construct()

public __construct(EntityManagerInterface $entityManager, LoggerInterface $logger) : mixed
Parameters
$entityManager : EntityManagerInterface

Doctrine entity manager.

$logger : LoggerInterface

Logs the anonymization operation.

anonymizeUsersByPointOfSale()

Anonymizes all users tied to a list of pointOfSaleIds.

public anonymizeUsersByPointOfSale(Request $request) : JsonResponse

Expected request (JSON): { "pointOfSaleIds": [1, 2, 3] }

Response: { "anonymizedCount": 5, "message": "Utilisateurs anonymisés avec succès" }

Parameters
$request : Request
Attributes
#[IsGranted]
'ROLE_SYSTEM'
#[Route]
'/api/users/anonymize-by-pos'
$name: 'api_anonymize_users_by_pos'
$methods: ['POST']
Return values
JsonResponse
On this page

Search results