UserEvents::USER_DELETED_EVENT => 'onUserDeleted',
];
} public function onUserWritten(EntityWrittenEvent
$event): void
{ $payloads =
$event->
getPayloads();
foreach ($payloads as $payload) { if ($this->
userCredentialsChanged($payload)) { $this->refreshTokenRepository->
revokeRefreshTokensForUser($payload['id'
]);
$this->
updateLastUpdatedPasswordTimestamp($payload['id'
]);
} } } public function onUserDeleted(EntityDeletedEvent
$event): void
{ $ids =
$event->
getIds();
foreach ($ids as $id) { $this->refreshTokenRepository->
revokeRefreshTokensForUser($id);
} }