From 3d89e5f94db409faf63cbed7d09fb197a32af133 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Sun, 15 Dec 2019 18:01:36 +0300 Subject: [PATCH] Fixes ACCOUNTS-5Z7. Search for legacy oauth session by correct column --- api/components/User/LegacyOAuth2Identity.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/api/components/User/LegacyOAuth2Identity.php b/api/components/User/LegacyOAuth2Identity.php index 44b5023..a28b698 100644 --- a/api/components/User/LegacyOAuth2Identity.php +++ b/api/components/User/LegacyOAuth2Identity.php @@ -27,11 +27,6 @@ class LegacyOAuth2Identity implements IdentityInterface { */ private $scopes; - /** - * @var OauthSession|null - */ - private $session = false; - private function __construct(string $accessToken, int $sessionId, array $scopes) { $this->accessToken = $accessToken; $this->sessionId = $sessionId; @@ -109,11 +104,7 @@ class LegacyOAuth2Identity implements IdentityInterface { } private function getSession(): ?OauthSession { - if ($this->session === false) { - $this->session = OauthSession::findOne(['id' => $this->sessionId]); - } - - return $this->session; + return OauthSession::findOne(['legacy_id' => $this->sessionId]); } }