Skip to content

Commit c24beb4

Browse files
committed
Add user session information for header template
1 parent 7459c9b commit c24beb4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/controllers/Server/View.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use \BNETDocs\Libraries\Router;
1111
use \BNETDocs\Libraries\Server;
1212
use \BNETDocs\Libraries\ServerType;
13+
use \BNETDocs\Libraries\UserSession;
1314
use \BNETDocs\Models\Server\View as ServerViewModel;
1415
use \BNETDocs\Views\Server\ViewHtml as ServerViewHtmlView;
1516
use \CarlBennett\MVC\Libraries\Common;
@@ -34,6 +35,7 @@ public function run(Router &$router) {
3435
throw new UnspecifiedViewException();
3536
}
3637
$model = new ServerViewModel();
38+
$model->user_session = UserSession::load($router);
3739

3840
$model->server_id = $this->server_id;
3941

src/models/Server/View.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ class View extends Model {
99
public $server;
1010
public $server_id;
1111
public $server_type;
12+
public $user_session;
1213

1314
public function __construct() {
1415
parent::__construct();
15-
$this->server = null;
16-
$this->server_id = null;
17-
$this->server_type = null;
16+
$this->server = null;
17+
$this->server_id = null;
18+
$this->server_type = null;
19+
$this->user_session = null;
1820
}
1921

2022
}

0 commit comments

Comments
 (0)