From 1aa7c404dae63c9518468fe9b579fad819f8d871 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 13 Sep 2026 18:32:43 +0000
Subject: [PATCH] =Single Event page setup done through the new Event block. Currently working on the Simple Calendar block setup

---
 inc/integrations/SyncToUser.php |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/inc/integrations/SyncToUser.php b/inc/integrations/SyncToUser.php
index 3e0777c..ea8a0ec 100644
--- a/inc/integrations/SyncToUser.php
+++ b/inc/integrations/SyncToUser.php
@@ -36,6 +36,9 @@
 	}
 	protected function handleUpdateUser(int $userID):void
 	{
+		if (isset(self::$syncing['users'][$userID])) {
+			return;
+		}
 		$user = $this->getOrCreateUser($userID);
 		if (!$user) {
 			return;
@@ -45,10 +48,12 @@
 		if (!empty($fields["_{$this->service_name}_item_id"])) {
 			return;
 		}
+		self::$syncing['users'][$userID] = true;
 
 		$this->removeSaveUser();
 		$this->handleTheSaveUser($userID);
 		$this->addSaveUser();
+		unset(self::$syncing['users'][$userID]);
 	}
 
 	protected function getOrCreateUser(int $userID):string|false

--
Gitblit v1.10.0