feat: listen to user life cycle events

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-08-09 22:37:56 -04:00
parent f4edaade10
commit 0e99bb0fd2
3 changed files with 57 additions and 0 deletions
+11
View File
@@ -177,4 +177,15 @@ class ServiceStore
return $result->getDeletedCount() > 0;
}
/**
* Delete every service owned by a user.
*/
public function deleteByUser(string $tenantId, string $userId): void
{
$this->dataStore->selectCollection(self::COLLECTION_NAME)->deleteMany([
'tid' => $tenantId,
'uid' => $userId,
]);
}
}