mirror of
https://github.com/elyby/accounts.git
synced 2024-11-06 08:11:24 +05:30
Fixes ACCOUNTS-5VE
This commit is contained in:
parent
9557064a97
commit
46b771a061
@ -41,6 +41,11 @@ class OAuth2Identity implements IdentityInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getAccount(): ?Account {
|
public function getAccount(): ?Account {
|
||||||
|
$session = $this->getSession();
|
||||||
|
if ($session === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->getSession()->account;
|
return $this->getSession()->account;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +75,7 @@ class OAuth2Identity implements IdentityInterface {
|
|||||||
|
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
|
|
||||||
private function getSession(): OauthSession {
|
private function getSession(): ?OauthSession {
|
||||||
return OauthSession::findOne(['id' => $this->_accessToken->getSessionId()]);
|
return OauthSession::findOne(['id' => $this->_accessToken->getSessionId()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user