你好,@fecshop。我想请教个问题?我现在想加一个用户表,该表内用户可能不是fecshop商城的用户。只用在使用fercshop功能的时候,我在我们fecshop的customer表内,如果没有该用户就生成。流程是:我登录使用 新表【Yii::$app->gos->identity】,如果使用到fecshop就使用原来的【Yii::$app->user->identity】,让其fecshop登录代码在【fecshop\app\appserver\modules\AppserverTokenController】ini()里面代码如图

protected function actionLoginById($customer_id=0){
$data = null;
if($customer_id){
$model = $this->_customerLoginModel;
$model->id = $customer_id;
$data = $model->login();
// $data = $this->_customerModel->find()->where(['id'=>$customer_id])->one();
// $data = \Yii::$app->user->login($data, 0);
}
return $data;//'fecshop login fail';
}
现在【Yii::$app->gos->identity】上面在第一次运行后一直为空。数据对象没有存入。
我的配置文件【appserver/config/main.php】是
'user' => [
// 'class' => 'fecshop\yii\web\User',
// 【默认】不开启速度限制的 User Model
'identityClass' => 'fecshop\models\mysqldb\Customer',
// 开启速度限制的 User Model
// 'identityClass' => 'fecshop\models\mysqldb\customer\CustomerAccessToken',
],
'gos'=>[
'class' => 'fecshop\yii\web\User',
'identityClass' => 'common\local\local_models\mysqldb\User',
// 'idParam' => '__id',
],
我排了很久,不知道神魔原因?不知道您知不知道原因。十分感谢!!!感谢!