check owner attendance

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2022-04-13 10:54:06 -01:00
parent d48eb74655
commit 75b4b39339

View file

@ -385,6 +385,10 @@ class FederatedUser extends ManagedModel implements
* @throws OwnerNotFoundException
*/
public function importFromCircle(Circle $circle): self {
if (!$circle->hasOwner()) {
throw new OwnerNotFoundException();
}
$this->setSingleId($circle->getSingleId());
if ($circle->isConfig(Circle::CFG_SINGLE)) {