mirror of
https://github.com/operasoftware/ssh-key-authority.git
synced 2026-01-06 12:50:17 -06:00
Fix problems displaying error page if no valid $active_user
This commit is contained in:
@@ -32,10 +32,10 @@ class PageSection {
|
||||
$this->data->menu_items['/users'] = 'Users';
|
||||
$this->data->menu_items['/groups'] = 'Groups';
|
||||
$this->data->menu_items['/pubkeys'] = 'Public keys';
|
||||
if($active_user->admin || count($active_user->list_admined_servers()) > 0) {
|
||||
if($active_user && ($active_user->admin || count($active_user->list_admined_servers()) > 0)) {
|
||||
$this->data->menu_items['/activity'] = 'Activity';
|
||||
}
|
||||
if($active_user->admin) {
|
||||
if($active_user && $active_user->admin) {
|
||||
$this->data->menu_items['/tools'] = 'Tools';
|
||||
}
|
||||
$this->data->menu_items['/help'] = 'Help';
|
||||
@@ -43,7 +43,7 @@ class PageSection {
|
||||
$this->data->active_user = $active_user;
|
||||
$this->data->web_config = $config['web'];
|
||||
$this->data->email_config = $config['email'];
|
||||
if($active_user->developer) {
|
||||
if($active_user && $active_user->developer) {
|
||||
$this->data->database = $database;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ header("Content-Security-Policy: default-src 'self'");
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted credit"><?php out($web_config['footer'], ESC_NONE)?></p>
|
||||
<?php if($this->get('active_user')->developer) { ?>
|
||||
<?php if($this->get('active_user') && $this->get('active_user')->developer) { ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user