public function actionIndex() { if (Yii::$app->user->isGuest || Yii::$app->user->identity->user_role != 4) { return $this->goHome(); } $searchModel = new UserCRUD(); $searchModel->scenario = User::SCENARIO_READ; $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all User models. * @return mixed */ public function actionIndex() { $searchModel = new UserCRUD(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }