Browse Source

fixed sso bug that didnt pass user object correctly

CauseFX 4 years ago
parent
commit
31019f726f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      api/classes/organizr.class.php
  2. 1 1
      api/functions/sso-functions.php

+ 1 - 1
api/classes/organizr.class.php

@@ -3534,7 +3534,7 @@ class Organizr
 				$createToken = $this->createToken($result['username'], $result['email'], $days);
 				if ($createToken) {
 					$this->logger->info('User has logged in');
-					$ssoUserObject = ($token !== '') ? $token : $authSuccess;
+					$ssoUserObject = ($token !== '') ? $authSuccess : $result;
 					$this->ssoCheck($ssoUserObject, $password, $token); //need to work on this
 					return ($output) ? array('name' => $this->cookieName, 'token' => (string)$createToken) : true;
 				} else {

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

@@ -45,7 +45,7 @@ trait SSOFunctions
 			$this->coookie('set', 'mpt', $token, $this->config['rememberMeDays'], false);
 		}
 		if ($this->config['ssoOmbi']) {
-			$this->logger->debug('Starting Ombi SSO check function', $userobj);
+			$this->logger->debug('Starting Ombi SSO check function');
 			$fallback = ($this->config['ombiFallbackUser'] !== '' && $this->config['ombiFallbackPassword'] !== '');
 			$ombiToken = $this->getOmbiToken($this->getSSOUserFor('ombi', $userobj), $password, $token, $fallback);
 			if ($ombiToken) {