Skip to content

Commit b4134c3

Browse files
committed
Fix hestiacp#4001 Unable to list overall stats admin user
1 parent 86f5bcb commit b4134c3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

web/list/stats/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php";
77

88
// Data
9-
if ($_SESSION["userContext"] === "admin" && !isset($_SESSION["look"])) {
9+
if ($_SESSION["userContext"] === "admin" && $_SESSION["look"] == "") {
1010
if (empty($_GET["user"])) {
1111
exec(HESTIA_CMD . "v-list-users-stats json", $output, $return_var);
1212
$data = json_decode(implode("", $output), true);

web/templates/pages/list_stats.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<div class="toolbar">
33
<div class="toolbar-inner">
44
<div class="toolbar-buttons">
5-
<?php if ($_SESSION["userContext"] === "admin" && !isset($_SESSION["look"])) { ?>
5+
<?php if ($_SESSION["userContext"] === "admin" && $_SESSION["look"] == '') { ?>
66
<a class="button button-secondary" href='/list/stats/'><i class="fas fa-binoculars icon-lightblue"></i><?= _("Overall Statistics") ?></a>
77
<?php } ?>
88
</div>
99
<div class="toolbar-right">
10-
<?php if ($_SESSION["userContext"] === "admin" && !isset($_SESSION["look"])) { ?>
10+
<?php if ($_SESSION["userContext"] === "admin" && $_SESSION["look"] == '') { ?>
1111
<form x-data x-bind="BulkEdit" action="/list/stats/" method="get">
1212
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
1313
<select class="form-select" name="user">

0 commit comments

Comments
 (0)