Skip to content

Commit eb609b1

Browse files
authored
Update Yii2.php
Fix all places where `$user` was confused with `$userComponent`
1 parent ce001f2 commit eb609b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Codeception/Lib/Connector/Yii2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ public function findAndLoginUser(int|string|IdentityInterface $user): void
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
/**

0 commit comments

Comments
 (0)