feat: listen to user life cycle events

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-08-08 21:47:07 -04:00
parent 6c4b42b32b
commit 18822a4d88
5 changed files with 214 additions and 3 deletions
+5 -1
View File
@@ -282,7 +282,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;
}