mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Always validate the default dashboard_id to make sure it still exists
fix: Always validate the default dashboard_id to make sure it still exists
This commit is contained in:
@@ -26,7 +26,7 @@ if ($tmp != 0) {
|
||||
$default_dash = $tmp;
|
||||
} elseif ((int)$config['webui']['default_dashboard_id']) {
|
||||
// if the user hasn't set their default page, and there is a global default set
|
||||
$default_dash = (int)$config['webui']['default_dashboard_id'];
|
||||
$default_dash = dbFetchCell('SELECT `dashboard_id` FROM `dashboards` WHERE `dashboard_id` = ?', array((int)$config['webui']['default_dashboard_id']));
|
||||
}
|
||||
if ($default_dash == 0 && dbFetchCell(
|
||||
'SELECT dashboard_id FROM dashboards WHERE user_id=?',
|
||||
|
||||
Reference in New Issue
Block a user