mirror of
https://github.com/elyby/accounts.git
synced 2024-08-26 14:29:57 +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 {
|
||||
$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()]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user