feat: listen to user life cycle events
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -176,4 +176,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,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user