Issue #18646 Cleanup auth data from session if findIdentity() returns… (#18649)

* Issue #18646 Cleanup auth data from session if findIdentity() returns null

* Issue #18646 Refactor fix to remove stale identity data from session

* Issue #18646 Fix test for HttpBasicAuth (#15658)

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Bizley <pawel@positive.codes>
This commit is contained in:
Michael Härtl
2021-08-11 10:35:01 +02:00
committed by GitHub
parent 1b1f257283
commit c94d7049c5
3 changed files with 15 additions and 17 deletions

View File

@ -728,6 +728,10 @@ class User extends Component
$this->renewIdentityCookie();
}
}
if ($this->getIdentity(false) === null) {
$this->switchIdentity(null);
}
}
/**