/** * Finds user by username * * @param string $username * @return static|null */ public static function findByUsername($username) { $dbUser = Radiususers::find()->where(["username" => $username, "status" => 1])->one(); if (!count($dbUser)) { return null; } return new static($dbUser); }
/** * Lists all Radiususers models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => Radiususers::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }