Skip to content

Commit 1158625

Browse files
committed
Adding correction to be in phase with IE login redirection and parameters added since YII v2.0.8
1 parent 5ed4df0 commit 1158625

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

components/GhostAccessControl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ protected function denyAccess()
100100
{
101101
if ( Yii::$app->user->getIsGuest() )
102102
{
103-
Yii::$app->user->loginRequired();
103+
Yii::$app->user->loginRequired(Yii::$app->request->isAjax, (strpos(Yii::$app->request->headers->get('Accept'), 'html') !== false));
104104
}
105105
else
106106
{
107107
throw new ForbiddenHttpException(Yii::t('yii', 'You are not allowed to perform this action.'));
108108
}
109109
}
110110

111-
}
111+
}

0 commit comments

Comments
 (0)