Use Request::setBody() for cookies disabled message

This commit is contained in:
Eric Lippmann 2015-08-27 13:21:43 +02:00
parent 016bcf070f
commit e92414ea6d
1 changed files with 5 additions and 2 deletions

View File

@ -38,8 +38,11 @@ class AuthenticationController extends Controller
}
if (! $requiresSetup) {
if (! $this->getRequest()->hasCookieSupport()) {
echo $this->translate("Cookies must be enabled to run this application.\n");
$this->getResponse()->setHttpResponseCode(403)->sendHeaders();
$this
->getResponse()
->setBody("Cookies must be enabled to run this application.\n")
->setHttpResponseCode(403)
->sendResponse();
exit();
}
$form->handleRequest();