From 75b4b393393f58c527a980c3bfabf0b7460bd013 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 13 Apr 2022 10:54:06 -0100 Subject: [PATCH] check owner attendance Signed-off-by: Maxence Lange --- lib/Model/FederatedUser.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Model/FederatedUser.php b/lib/Model/FederatedUser.php index e9f4e9309..ac6a7ca2e 100644 --- a/lib/Model/FederatedUser.php +++ b/lib/Model/FederatedUser.php @@ -385,6 +385,10 @@ public function import(array $data): IDeserializable { * @throws OwnerNotFoundException */ public function importFromCircle(Circle $circle): self { + if (!$circle->hasOwner()) { + throw new OwnerNotFoundException(); + } + $this->setSingleId($circle->getSingleId()); if ($circle->isConfig(Circle::CFG_SINGLE)) {