public loginRequired ( boolean $checkAjax = true, boolean $checkAcceptHeader = true ) : |
||
$checkAjax | boolean | whether to check if the request is an AJAX request. When this is true and the request is an AJAX request, the current URL (for AJAX request) will NOT be set as the return URL. |
$checkAcceptHeader | boolean | whether to check if the request accepts HTML responses. Defaults to `true`. When this is true and the request does not accept HTML responses the current URL will not be SET as the return URL. Also instead of redirecting the user an ForbiddenHttpException is thrown. This parameter is available since version 2.0.8. |
Результат | the redirection response if [[loginUrl]] is set |