Changed IDE to Visual Studio code and minor style changes

This commit is contained in:
Bernd Bestel
2017-11-05 11:02:00 +01:00
parent 2a3822e781
commit 05a9406a32
38 changed files with 1453 additions and 148 deletions

View File

@@ -39,7 +39,7 @@ if (!Grocy::IsDemoInstallation())
$route = $request->getAttribute('route');
$routeName = $route->getName();
if (!Grocy::IsValidSession($_COOKIE['grocy_session']) && $routeName !== 'login')
if ((!isset($_COOKIE['grocy_session']) || !Grocy::IsValidSession($_COOKIE['grocy_session'])) && $routeName !== 'login')
{
$response = $response->withRedirect('/login');
}