/* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Секции'; $this->params['breadcrumbs'][] = $this->title; $aDocladTypes = Doclad::getAllTypes(); ?> <div class="section-index"> <!-- h1><?php echo Html::encode($this->title); ?> </h1 --> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a('Добавить секцию', ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => ['sec_title', ['attribute' => 'sec_cnf_id', 'class' => 'yii\\grid\\DataColumn', 'filter' => Conference::getList(), 'value' => function ($model, $key, $index, $column) { return Conference::getById($model->sec_cnf_id); }], ['attribute' => 'sec_doclad_type', 'class' => 'yii\\grid\\DataColumn', 'filter' => $aDocladTypes, 'value' => function ($model, $key, $index, $column) use($aDocladTypes) { return isset($aDocladTypes[$model->sec_doclad_type]) ? $aDocladTypes[$model->sec_doclad_type] : ''; }], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}']]]); ?> </div>
/** * Confirm user registration * @return mixed */ public function actionConfirmemail($key = '') { $this->layout = 'frontend01'; if ($key == '') { throw new InvalidCallException('Не указан ключ'); } $model = User::findOne(['us_confirmkey' => $key]); if ($model !== null) { $model->us_active = 1; $model->scenario = 'confirmregister'; $model->us_confirmkey = ''; if ($model->save()) { $oConf = Conference::getById($model->us_conference_id, 1); if ($oConf === null) { throw new NotFoundHttpException('Не найдена конференция для регистрации'); } return $this->redirect([$oConf->cnf_controller . '/confirm', 'id' => $model->us_id]); } else { Yii::info('Error save User Confirmemail: ' . print_r($model->getErrors(), true)); throw new NotFoundHttpException('Ошибка подтверждения регистрации' . print_r($model->getErrors(), true)); } } throw new NotFoundHttpException('Ошибка подтверждения регистрации - не найдена требуемая информация'); return ''; }