From f94860aacd6200fb24c9e7431eb379a368cb392d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 10 Jul 2026 00:35:44 +0000
Subject: [PATCH] =Refactored CredentialsManager.php to utilize a CustomTable instance instead

---
 inc/registrar/Fields.php |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/inc/registrar/Fields.php b/inc/registrar/Fields.php
index c8a2d95..f9668f2 100644
--- a/inc/registrar/Fields.php
+++ b/inc/registrar/Fields.php
@@ -36,6 +36,9 @@
 				break;
 			case 'user':
 				$this->addUserFields();
+				if ($registrar->hasAnyIntegrations()) {
+					$this->addIntegrationSetupField();
+				}
 				break;
 		}
 	}
@@ -458,4 +461,17 @@
 	{
 		return (new self())->defaultUserFields();
 	}
+
+	protected function addIntegrationSetupField():void
+	{
+		$integrations = $this->registrar->getIntegrations();
+		foreach (array_keys($integrations) as $integration) {
+			$this->addField('integration_'.$integration.'_connected', [
+				'type'	=> 'true_false',
+				'hidden'	=> true,
+				'label'		=> 'Connected to '.$integration,
+				'default'	=> false,
+			]);
+		}
+	}
 }

--
Gitblit v1.10.0