From da5e7a023cec055984fbaab81609d2ddd4bccf13 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Sun, 19 Aug 2007 08:07:53 -0400 Subject: [PATCH] Fixed a problem in the session initialization --- interface/web/login/index.php | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/interface/web/login/index.php b/interface/web/login/index.php index b59a760..7e1efad 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -36,11 +36,12 @@ private $target = ''; public function render() { + if(isset($_SESSION['s']['user']) && is_array($_SESSION['s']['user']) && is_array($_SESSION['s']['module'])) { die('HEADER_REDIRECT:'.$_SESSION['s']['module']['startpage']); } - global $app; + global $app, $conf; $app->uses('tpl'); $app->tpl->newTemplate('form.tpl.htm'); @@ -64,14 +65,14 @@ $_SESSION['s']['user'] = $user; $_SESSION['s']['user']['theme'] = isset($user['app_theme']) ? $user['app_theme'] : 'default'; $_SESSION['s']['language'] = $user['language']; - //print_r($_SESSION); + $_SESSION["s"]['theme'] = $_SESSION['s']['user']['theme']; + if(is_file($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) { include_once($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php'); $_SESSION['s']['module'] = $module; } - echo 'HEADER_REDIRECT:'.$_SESSION['s']['module']['startpage']; - //echo 'HEADER_REDIRECT:content.php?s_mod=admin&s_pg=index'; + exit; } else { $error = $app->lng(1003); -- Gitblit v1.9.1