Fixes ACCOUNTS-5Z7. Search for legacy oauth session by correct column

This commit is contained in:
ErickSkrauch 2019-12-15 18:01:36 +03:00
parent 299637cc13
commit 3d89e5f94d

View File

@ -27,11 +27,6 @@ class LegacyOAuth2Identity implements IdentityInterface {
*/ */
private $scopes; private $scopes;
/**
* @var OauthSession|null
*/
private $session = false;
private function __construct(string $accessToken, int $sessionId, array $scopes) { private function __construct(string $accessToken, int $sessionId, array $scopes) {
$this->accessToken = $accessToken; $this->accessToken = $accessToken;
$this->sessionId = $sessionId; $this->sessionId = $sessionId;
@ -109,11 +104,7 @@ class LegacyOAuth2Identity implements IdentityInterface {
} }
private function getSession(): ?OauthSession { private function getSession(): ?OauthSession {
if ($this->session === false) { return OauthSession::findOne(['legacy_id' => $this->sessionId]);
$this->session = OauthSession::findOne(['id' => $this->sessionId]);
}
return $this->session;
} }
} }