From a9654f00c8fbc9934289d761843ddd071025013f Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 28 Aug 2026 17:20:28 +0000
Subject: [PATCH] =PHPStorm Code Inspection: fixed class reference errors (from getting rid of JVB() and replacing with direct class::getInstance; as well as general code sniffing, etc

---
 inc/integrations/UserConnection.php |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/inc/integrations/UserConnection.php b/inc/integrations/UserConnection.php
index 5202e6e..5185319 100644
--- a/inc/integrations/UserConnection.php
+++ b/inc/integrations/UserConnection.php
@@ -19,7 +19,7 @@
 	}
 	public function switchUser(?int $userID = null):bool
 	{
-		if (!$this->userCanConnect($userID)) {
+		if (!is_null($userID) && !$this->userCanConnect($userID)) {
 			return false;
 		}
 		$this->clearUser();
@@ -37,7 +37,6 @@
 	protected function clearUser():void
 	{
 		$this->userID = false;
-		$this->credentials = [];
 		if (property_exists($this, 'rateLimiter')) {
 			$this->requestLimiter?->saveHistory();
 			$this->requestLimiter = null;

--
Gitblit v1.10.0