feat: listen to user life cycle events

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-08-08 21:51:07 -04:00
parent c0f154eddb
commit 25c3043b82
5 changed files with 216 additions and 3 deletions
+5 -1
View File
@@ -279,7 +279,11 @@ class PersonalService implements ServiceBaseInterface, ServiceCollectionMutableI
throw new InvalidParameterException("Invalid: Collection identifier '$id' does not exist or does not belong to user '{$this->serviceUserId}'");
}
// destroy collection in store
$this->store->collectionDestroyById($this->serviceTenantId, $this->serviceUserId, $id);
$collection = $this->store->collectionFetch($this->serviceTenantId, $this->serviceUserId, $id);
if ($collection === null) {
throw new InvalidParameterException("Invalid: Collection identifier '$id' could not be retrieved");
}
$this->store->collectionDestroy($this->serviceTenantId, $this->serviceUserId, $collection);
unset($this->serviceCollectionCache[$id]);
return true;
}