Skip to content

Commit 9553911

Browse files
author
vogelor
committed
Improved Theme-Handling (nor every user can have its own theme)
1 parent bb30da9 commit 9553911

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

interface/lib/app.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ public function tpl_defaults() {
203203
if(isset($_SESSION['s']['user']) && $this->auth->has_clients($_SESSION['s']['user']['userid'])) {
204204
$this->tpl->setVar('is_reseller', 1);
205205
}
206+
/* Show username */
207+
if(isset($_SESSION['s']['user'])) {
208+
$this->tpl->setVar('cpuser', $_SESSION['s']['user']['username']);
209+
}
206210
}
207211

208212
} // end class

interface/web/login/index.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ public function render() {
152152

153153
$app->plugin->raiseEvent('login',$this);
154154

155-
echo 'HEADER_REDIRECT:'.$_SESSION['s']['module']['startpage'];
155+
/*
156+
* We need LOGIN_REDIRECT instead of HEADER_REDIRECT to load the
157+
* new theme, if the logged-in user has another
158+
*/
159+
echo 'LOGIN_REDIRECT:'.$_SESSION['s']['module']['startpage'];
156160

157161
exit;
158162
} else {

0 commit comments

Comments
 (0)