Hi.
in my controller I have this below behaviour
function:
public function behaviors()
{
return [
'verbs' => [
'class' => \yii\filters\VerbFilter::className(),
'actions' => [
'verifym' => ['OPTIONS','POST','GET']
]
],
'access' => [
'class' => \yii\filters\AccessControl::className(),
'rules' => [
[
'allow' => true,
'actions' => [
'index', 'payment', 'result', 'verify',
'paymentvalidation'
],
'roles' => [ 'user' ]
],
[
'allow' => true,
'actions' => ['verifym'],
'roles' => ['*']
]
],
'denyCallback' => function ($rule, $action) {
$this->redirect([ '/' ]);
return null;
}
]
];
}
When from outside referrer calls verifym
action it not calls, and denyCallBack
fires.
And user identity is null.
Why denyCallBack
is fire and what change needs in my access rule for this?
Why user identity is null and How can access to that in callback process?