更新时间:2023-09-12 10:26:10
尝试在用户两个组件中设置类属性:
Try to set a class property in the user-two component:
'user-two' => [
'class' => 'yii\web\User'
'identityClass' => 'app\models\SecondUser',
'enableAutoLogin' => true,
],
或创建从yii \ web \ User类继承的新类,并进行如下设置:
or create new class inherited from the yii\web\User class and set like this:
'user-two' => [
'class' => 'app\models\NewClassInheritedFromUserClass'
....
]
也许这会对您有所帮助.
Maybe this will help you.