|
|
@@ -238,7 +238,7 @@ class ToolController extends BaseController
|
|
|
$userComponent = new \yii\web\User(['identityClass' => 'common\models\User']);
|
|
|
// 模拟一个用户身份,设置管理员ID为1(可根据实际情况修改)
|
|
|
$userIdentity = new \stdClass();
|
|
|
- $userIdentity->id = 1; // 管理员ID
|
|
|
+ $userIdentity->ID = '354832362066022400'; // 管理员ID
|
|
|
$userComponent->setIdentity($userIdentity);
|
|
|
// 将模拟的user组件绑定到应用实例
|
|
|
Yii::$app->set('user', $userComponent);
|