Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 006603ee authored by Akhil's avatar Akhil
Browse files

Change order of checks

parent 3febc627
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
+			$appManager = \OC::$server->get(OCP\App\IAppManager);
+
+			if  ($this->session->getSession() instanceof ISession && $this->session->getSession()->exists('is_oidc')
+				&& $appManager->isEnabledForUser('oidc_login') && $this->request->getHeader('OIDC-LOGIN-WITH-TOKEN') === 'true' && !empty($bearerToken)) {
+				&& $this->request->getHeader('OIDC-LOGIN-WITH-TOKEN') === 'true' && !empty($bearerToken) && $appManager->isEnabledForUser('oidc_login') ) {
+				try {
+					$loginService = \OC::$server->get(OCA\OIDCLogin\Service\LoginService::class);
+					$loginService->loginWithBearerToken($bearerToken);