public function actionAdmin()
	{
		$model = new User();
		$profile = new Profile();

		$model->scenario = 'register';

		if ($model->load(Yii::$app->request->post())) {
			if (Yii::$app->request->isAjax) {
				Yii::$app->response->format = Response::FORMAT_JSON;

				return ActiveForm::validate($model);
			}

			if ($model->register(TRUE))
				return $this->redirect(Yii::$app->urlManager->createUrl('//installer/config/finished'));
		}

		return $this->render('admin', ['model' => $model, 'profile' => $profile]);
	}
public function actionAdmin()
	{
		$model = new User();
		$profile = new Profile();

		$model->scenario = 'register';

		if ($model->load(Yii::$app->request->post())) {
			if (Yii::$app->request->isAjax) {
				Yii::$app->response->format = Response::FORMAT_JSON;

				return ActiveForm::validate($model);
			}

			if ($model->register(TRUE))
				return $this->redirect(Yii::$app->urlManager->createUrl('//installer/config/finished'));
		}

		return $this->render('admin', ['model' => $model, 'profile' => $profile]);
	}
public function actionAdmin ( ) { $ model = new User ( ) ; $ profile = new Profile ( ) ; $ model -> scenario = 'register' ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) ) { if ( Yii :: $ app -> request -> isAjax ) { Yii :: $ app -> response -> format = Response :: FORMAT_JSON ; return ActiveForm :: validate ( $ model ) ; } if ( $ model -> register ( TRUE ) ) return $ this -> redirect ( Yii :: $ app -> urlManager -> createUrl ( '//installer/config/finished' ) ) ; } return $ this -> render ( 'admin' , [ 'model' => $ model , 'profile' => $ profile ] ) ; }
Setup Administrative User

This should be the last step, before the user is created also the
application secret will created.
Setup Administrative User