소스 검색

fixed Cannot access offset of type string on string (#1769)

CauseFX 4 년 전
부모
커밋
8ab7d8ee30
1개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 9 9
      api/functions/sso-functions.php

+ 9 - 9
api/functions/sso-functions.php

@@ -21,7 +21,7 @@ trait SSOFunctions
 		}
 		return $cookies;
 	}
-	
+
 	public function getSSOUserFor($app, $userobj)
 	{
 		$map = array(
@@ -34,11 +34,11 @@ trait SSOFunctions
 		);
 		return (gettype($userobj) == 'string') ? $userobj : $userobj[$map[$app]];
 	}
-	
+
 	public function ssoCheck($userobj, $password, $token = null)
 	{
 		$this->setCurrentUser(false);
-		$this->setLoggerChannel('Authentication', $userobj['username']);
+		$this->setLoggerChannel('Authentication', $this->user['username']);
 		$this->logger->debug('Starting SSO check function');
 		if ($this->config['ssoPlex'] && $token) {
 			$this->logger->debug('Setting Plex SSO cookie');
@@ -113,7 +113,7 @@ trait SSOFunctions
 		}
 		return true;
 	}
-	
+
 	public function getKomgaToken($email, $password)
 	{
 		try {
@@ -136,7 +136,7 @@ trait SSOFunctions
 		}
 		return false;
 	}
-	
+
 	public function getJellyfinToken($username, $password)
 	{
 		$token = null;
@@ -171,7 +171,7 @@ trait SSOFunctions
 		}
 		return false;
 	}
-	
+
 	public function getOmbiToken($username, $password, $oAuthToken = null, $fallback = false)
 	{
 		$token = null;
@@ -212,7 +212,7 @@ trait SSOFunctions
 			return false;
 		}
 	}
-	
+
 	public function getTautulliToken($username, $password, $plexToken = null)
 	{
 		$token = null;
@@ -252,7 +252,7 @@ trait SSOFunctions
 		}
 		return ($token) ? $token : false;
 	}
-	
+
 	public function getOverseerrToken($email, $password, $oAuthToken = null, $fallback = false)
 	{
 		$token = null;
@@ -292,7 +292,7 @@ trait SSOFunctions
 			return false;
 		}
 	}
-	
+
 	public function getPetioToken($username, $password, $oAuthToken = null, $fallback = false)
 	{
 		$token = null;