/**
  * Lists all YBoardMember models.
  * @return mixed
  */
 public function actionIndex()
 {
     if (!Yii::$app->user->can('app.forum.member.index')) {
         throw new ForbiddenHttpException(YBoard::t('yboard', 'You have no enough permission to access this page! If you think its a mistake, please consider reporting to us.'));
     }
     $user = new User();
     $qstring = Yii::$app->request->get($user->formName())['username'];
     $user->username = $qstring;
     $userIds = User::find()->select('id')->asArray()->filterWhere(['like', 'username', $qstring])->all();
     $query = YBoardMember::find();
     foreach ($userIds as $id) {
         $query->orWhere(['id' => $id['id']]);
     }
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     //if ($searchModel->load(Yii::$app->request->getQueryParams())) {
     //    $query->andFilterWhere(['like','id', $searchModel->id]);
     //}
     return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $user]);
 }