Skip to content

Commit

Permalink
fix if identity is null
Browse files Browse the repository at this point in the history
  • Loading branch information
MartkCz authored Oct 30, 2020
1 parent d7bc6f9 commit f8e115f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/UserStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

class UserStorage extends Http\UserStorage {

/** @var Identity */
private $identity;
/** @var Identity|false|null */
private $identity = false;

/** @var IAccountLoginModel */
private $model;
Expand Down Expand Up @@ -47,6 +47,7 @@ public function getIdentity(): ?IIdentity {
if (!$account) { // clear identity, account not found
$this->setAuthenticated(false);
$this->setIdentity(null);
$this->identity = null;
} else {
$this->identity = $this->identityFactory->create($identity->getId(), $account);
}
Expand Down

0 comments on commit f8e115f

Please sign in to comment.