/**
  * Lists all YBoardSetting models.
  * @return mixed
  */
 public function actionIndex()
 {
     if (!Yii::$app->user->can('app.forum.setting.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.'));
     }
     $dataProvider = new ActiveDataProvider(['query' => YBoardSetting::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
 /**
  * Displays a single YBoardBan model.
  * @param integer $id
  * @return mixed
  */
 public function actionBanned($id)
 {
     $model = YBoardBan::findOne($id);
     $user = YBoardMember::findOne($model->user_id);
     $isIP = true;
     if ($user !== null) {
         $isIP = false;
     }
     if ($model == null) {
         throw new NotFoundHttpException(YBoard::t('yboard', 'The requested Banned User does not exist.'));
     }
     $settings = YBoardSetting::find()->where(['key' => 'email'])->one();
     return $this->render('banned', ['model' => $model, 'member' => $user, 'isIp' => $isIP, 'email' => $settings == null ? YBoard::t('board', 'no email') : $settings->value]);
 }