File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Codeception/Lib/Connector Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,22 +133,22 @@ public function resetApplication(bool $closeSession = true): void
133133 public function findAndLoginUser (int |string |IdentityInterface $ user ): void
134134 {
135135 $ app = $ this ->getApplication ();
136- $ user = $ app ->get ('user ' );
137- if (!$ user instanceof User) {
136+ $ userComponent = $ app ->get ('user ' );
137+ if (!$ userComponent instanceof User) {
138138 throw new ConfigurationException ('The user component is not configured ' );
139139 }
140140
141141 if ($ user instanceof \yii \web \IdentityInterface) {
142142 $ identity = $ user ;
143143 } else {
144144 // class name implementing IdentityInterface
145- $ identityClass = $ user ->identityClass ;
145+ $ identityClass = $ userComponent ->identityClass ;
146146 $ identity = call_user_func ([$ identityClass , 'findIdentity ' ], $ user );
147147 if (!isset ($ identity )) {
148148 throw new \RuntimeException ('User not found ' );
149149 }
150150 }
151- $ user ->login ($ identity );
151+ $ userComponent ->login ($ identity );
152152 }
153153
154154 /**
You can’t perform that action at this time.
0 commit comments