Fixes ACCOUNTS-5VE

This commit is contained in:
ErickSkrauch 2019-12-02 22:28:47 +03:00
parent 9557064a97
commit 46b771a061

View File

@ -41,6 +41,11 @@ class OAuth2Identity implements IdentityInterface {
}
public function getAccount(): ?Account {
$session = $this->getSession();
if ($session === null) {
return null;
}
return $this->getSession()->account;
}
@ -70,7 +75,7 @@ class OAuth2Identity implements IdentityInterface {
// @codeCoverageIgnoreEnd
private function getSession(): OauthSession {
private function getSession(): ?OauthSession {
return OauthSession::findOne(['id' => $this->_accessToken->getSessionId()]);
}