From 6640bf5ed92c698dfbdfca87addf2bdca7f197e1 Mon Sep 17 00:00:00 2001 From: Glambertessa Date: Mon, 18 Nov 2019 10:55:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BE=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/config/main.php | 2 +- .../modules/card/controllers/UserCardController.php | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/frontend/config/main.php b/frontend/config/main.php index c60d360..339f96e 100755 --- a/frontend/config/main.php +++ b/frontend/config/main.php @@ -52,7 +52,7 @@ return [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ - '' => 'card1/user-card/index', + '' => 'card/user-card/index', 'site/index' => 'card/user-card/index', ], ], diff --git a/frontend/modules/card/controllers/UserCardController.php b/frontend/modules/card/controllers/UserCardController.php index 7933d9f..bb0039c 100644 --- a/frontend/modules/card/controllers/UserCardController.php +++ b/frontend/modules/card/controllers/UserCardController.php @@ -5,7 +5,6 @@ namespace frontend\modules\card\controllers; use common\models\CardSkill; use common\models\FieldsValueNew; -use common\models\User; use Yii; use common\models\UserCard; use yii\data\ActiveDataProvider; @@ -21,13 +20,6 @@ class UserCardController extends Controller */ public function actionIndex() { - /* $id_user = Yii::$app->user->id; - $id = UserCard::find()->where(['id_user' => $id_user])->asArray()->all(); - - return $this->render('index', [ - 'model' => $this->findModel($id[0]['id']), - ]);*/ - $id_user = Yii::$app->user->id; $result = UserCard::find()->where(['id_user' => $id_user])->asArray()->all(); $id = $result[0]['id']; @@ -43,14 +35,10 @@ class UserCardController extends Controller $skills = CardSkill::find()->where(['card_id' => $id])->with('skill')->all(); - $id_current_user = $this->findModel($id)->id_user; - return $this->render('index', [ 'model' => $this->findModel($id), 'modelFildValue' => $dataProvider, 'skills' => $skills, - // 'userData' => $userData, - //userData' => User::findOne($id_current_user), ]); }