Respect user isolation in global stats queries
Updated LayoutHelper::getGlobalStats to accept a user ID and apply user isolation mode when querying domain statistics. DashboardController and base layout now pass the user ID to ensure stats are scoped per user when isolation is enabled.
This commit is contained in:
@@ -16,7 +16,8 @@ if (isset($_SESSION['user_id'])) {
|
||||
|
||||
// Fetch global stats for sidebar (available on all pages)
|
||||
if (!isset($globalStats)) {
|
||||
$globalStats = \App\Helpers\LayoutHelper::getGlobalStats();
|
||||
$userId = \Core\Auth::id();
|
||||
$globalStats = \App\Helpers\LayoutHelper::getGlobalStats($userId);
|
||||
}
|
||||
|
||||
// Get application settings from database
|
||||
|
||||
Reference in New Issue
Block a user