File tree 1 file changed +4
-4
lines changed
src/Codeception/Lib/Connector
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
133
133
public function findAndLoginUser (int |string |IdentityInterface $ user ): void
134
134
{
135
135
$ app = $ this ->getApplication ();
136
- $ user = $ app ->get ('user ' );
137
- if (!$ user instanceof User) {
136
+ $ userComponent = $ app ->get ('user ' );
137
+ if (!$ userComponent instanceof User) {
138
138
throw new ConfigurationException ('The user component is not configured ' );
139
139
}
140
140
141
141
if ($ user instanceof \yii \web \IdentityInterface) {
142
142
$ identity = $ user ;
143
143
} else {
144
144
// class name implementing IdentityInterface
145
- $ identityClass = $ user ->identityClass ;
145
+ $ identityClass = $ userComponent ->identityClass ;
146
146
$ identity = call_user_func ([$ identityClass , 'findIdentity ' ], $ user );
147
147
if (!isset ($ identity )) {
148
148
throw new \RuntimeException ('User not found ' );
149
149
}
150
150
}
151
- $ user ->login ($ identity );
151
+ $ userComponent ->login ($ identity );
152
152
}
153
153
154
154
/**
You can’t perform that action at this time.
0 commit comments