From 95539119e14bb1a472cb732989a978dd240bc04b Mon Sep 17 00:00:00 2001 From: vogelor <vogelor@ispconfig3> Date: Tue, 04 May 2010 05:28:07 -0400 Subject: [PATCH] Improved Theme-Handling (nor every user can have its own theme) --- interface/web/login/index.php | 6 +++++- interface/lib/app.inc.php | 4 ++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php index 28ba6bc..8694324 100644 --- a/interface/lib/app.inc.php +++ b/interface/lib/app.inc.php @@ -203,6 +203,10 @@ if(isset($_SESSION['s']['user']) && $this->auth->has_clients($_SESSION['s']['user']['userid'])) { $this->tpl->setVar('is_reseller', 1); } + /* Show username */ + if(isset($_SESSION['s']['user'])) { + $this->tpl->setVar('cpuser', $_SESSION['s']['user']['username']); + } } } // end class diff --git a/interface/web/login/index.php b/interface/web/login/index.php index c1fa43b..22a1eac 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -152,7 +152,11 @@ $app->plugin->raiseEvent('login',$this); - echo 'HEADER_REDIRECT:'.$_SESSION['s']['module']['startpage']; + /* + * We need LOGIN_REDIRECT instead of HEADER_REDIRECT to load the + * new theme, if the logged-in user has another + */ + echo 'LOGIN_REDIRECT:'.$_SESSION['s']['module']['startpage']; exit; } else { -- Gitblit v1.9.1