mirror of
https://github.com/elyby/accounts.git
synced 2024-11-06 08:11:24 +05:30
Fixes ACCOUNTS-5Z7. Search for legacy oauth session by correct column
This commit is contained in:
parent
299637cc13
commit
3d89e5f94d
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user