Skip to content

Commit f9d45f4

Browse files
authored
Merge pull request #139 from Stunc0/correction-redirection-login-IE
Correction for login redirection under IE.
2 parents d9b9f5c + 1158625 commit f9d45f4

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)