From 218b305a3e6b94c7a5bd551f67fe6d9bb05d5e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Sun, 7 Jun 2015 13:33:59 +0200 Subject: [PATCH] fix broken session creation --- includes/engelsystem_provider.php | 3 +++ includes/pages/guest_login.php | 1 + public/index.php | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/engelsystem_provider.php b/includes/engelsystem_provider.php index cbc1cb1d..56d12de6 100644 --- a/includes/engelsystem_provider.php +++ b/includes/engelsystem_provider.php @@ -71,6 +71,9 @@ require_once realpath(__DIR__ . '/../includes/pages/user_shifts.php'); require_once realpath(__DIR__ . '/../vendor/parsedown/Parsedown.php'); +session_lifetime(24 * 60, preg_replace("/[^a-z0-9-]/", '', md5(__DIR__))); +session_start(); + gettext_init(); sql_connect($config['host'], $config['user'], $config['pw'], $config['db']); diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 8f128d9e..741fd826 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -269,6 +269,7 @@ function guest_login() { if ($ok) { $_SESSION['uid'] = $login_user['UID']; $_SESSION['locale'] = $login_user['Sprache']; + redirect(page_link_to('news')); } } diff --git a/public/index.php b/public/index.php index d69c4361..418b7eea 100644 --- a/public/index.php +++ b/public/index.php @@ -1,9 +1,6 @@