File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,10 +133,7 @@ final public function logout(bool $clearIdentity = false): void
133133 */
134134 final public function isLoggedIn (): bool
135135 {
136- if ($ this ->authenticated === null ) {
137- $ this ->getStoredData ();
138- }
139-
136+ $ this ->loadStoredData ();
140137 return (bool ) $ this ->authenticated ;
141138 }
142139
@@ -147,16 +144,17 @@ final public function isLoggedIn(): bool
147144 */
148145 final public function getIdentity (): ?IIdentity
149146 {
150- if ($ this ->authenticated === null ) {
151- $ this ->getStoredData ();
152- }
153-
147+ $ this ->loadStoredData ();
154148 return $ this ->identity ;
155149 }
156150
157151
158- private function getStoredData (): void
152+ private function loadStoredData (): void
159153 {
154+ if ($ this ->authenticated !== null ) {
155+ return ;
156+ }
157+
160158 (function (bool $ state , ?IIdentity $ id , ?int $ reason ) use (&$ identity ) {
161159 $ identity = $ id ;
162160 $ this ->authenticated = $ state ;
You can’t perform that action at this time.
0 commit comments