johnitvn / yii2-user-plus

High flexible user management extension for yii2
23 stars 22 forks source link

Don't extends behaviors in SecurityController of basic module #4

Closed johnitvn closed 9 years ago

johnitvn commented 9 years ago

In the class johnitvn\userplus\simple\controllers\SecurityController just define access controll for 4 actions: logout, change-password, login, register

'access' => [
    'class' => AccessControl::className(),
    'only' => ['logout', 'change-password', 'login', 'register'],
    'rules' => [
        [
            'actions' => ['login', 'register'],
            'allow' => true,
            'roles' => ['?'],
        ],
        [
            'actions' => ['logout', 'change-password'],
            'allow' => true,
            'roles' => ['@'],
        ],
    ],
],

Need to extends behaviors() in johnitvn\userplus\basic\controllers\SecurityController