|
@@ -3,7 +3,9 @@
|
|
|
namespace app\controllers;
|
|
namespace app\controllers;
|
|
|
|
|
|
|
|
use Yii;
|
|
use Yii;
|
|
|
|
|
+use yii\web\AccessControl;
|
|
|
use yii\web\Controller;
|
|
use yii\web\Controller;
|
|
|
|
|
+use yii\web\VerbFilter;
|
|
|
use app\models\LoginForm;
|
|
use app\models\LoginForm;
|
|
|
use app\models\ContactForm;
|
|
use app\models\ContactForm;
|
|
|
|
|
|
|
@@ -13,7 +15,7 @@ class SiteController extends Controller
|
|
|
{
|
|
{
|
|
|
return array(
|
|
return array(
|
|
|
'access' => array(
|
|
'access' => array(
|
|
|
- 'class' => \yii\web\AccessControl::className(),
|
|
|
|
|
|
|
+ 'class' => AccessControl::className(),
|
|
|
'only' => array('login', 'logout'),
|
|
'only' => array('login', 'logout'),
|
|
|
'rules' => array(
|
|
'rules' => array(
|
|
|
array(
|
|
array(
|
|
@@ -28,6 +30,12 @@ class SiteController extends Controller
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
|
|
+ 'verbs' => array(
|
|
|
|
|
+ 'class' => VerbFilter::className(),
|
|
|
|
|
+ 'actions' => array(
|
|
|
|
|
+ 'logout' => array('post'),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|