[ 'class' => AccessControl::className(), 'rules' => [ [ 'actions' => ['cabinet','change-password', 'bookmarks'], 'allow' => true, 'roles' => ['@'], ], ], ], ]; } public function actionCabinet() { $model = $this->findModel(Yii::$app->user->identity->id); if ($model->load(Yii::$app->request->post()) && $model->validate()) { $model->save(); } return $this->render('cabinet', [ 'model' => $model ]); } public function actionBookmarks() { return $this->render('bookmarks'); } protected function findModel($id) { if (($model = User::findOne(["id"=>$id])) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } } }