/** * Finds user by [[username]] * * @return User|null */ public function getUser() { // if ($this->user === false) { if (true) { $this->user = Vip::find()->andWhere(['or', ['username' => $this->username], ['email' => $this->username]])->one(); } return $this->user; }
/** * Lists all Vip models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => Vip::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }