diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index ba83131..22717c7 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -31,51 +31,6 @@ class SiteController extends Controller /** * @inheritdoc */ - public function behaviors() - { - return [ - 'access' => [ - 'class' => AccessControl::className(), - 'only' => ['logout', 'signup', 'index'], - 'rules' => [ - [ - 'actions' => ['signup'], - 'allow' => true, - 'roles' => ['?'], - ], - [ - 'actions' => ['logout'], - 'allow' => true, - 'roles' => ['@'], - ], - [ - 'actions' => ['index'], - 'allow' => true, - 'roles' => ['@'], - ] - ], - ], - 'verbs' => [ - 'class' => VerbFilter::className(), - 'actions' => [ - 'logout' => ['post'], - ], - ], - 'eauth' => [ - // required to disable csrf validation on OpenID requests - 'class' => \nodge\eauth\openid\ControllerBehavior::className(), - 'only' => ['login'], - ], - ]; - } - - - - - - /** - * @inheritdoc - */ public function actions() { return [ @@ -122,7 +77,7 @@ class SiteController extends Controller */ public function actionLogin() { - + $this->layout = 'admin'; if (!\Yii::$app->user->isGuest) { return $this->goHome(); @@ -211,6 +166,7 @@ class SiteController extends Controller */ public function actionLogout() { + Yii::$app->user->logout(); return $this->goHome(); @@ -251,6 +207,8 @@ class SiteController extends Controller */ public function actionSignup() { + $this->layout = 'admin'; + $model = new SignupForm(); if ($model->load(Yii::$app->request->post())) { if ($user = $model->signup()) { diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 7a90718..cdd5897 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -47,7 +47,7 @@ AppAsset::register($this); if (Yii::$app->user->isGuest): ?>