Permalink
Browse files

Allow guest access to cacti by default.

My note from 2011-02-07 says "a better fix would be to create a new file
that includes index.php"
  • Loading branch information...
1 parent f103adc commit 9752db76dd1c7f4c412fc8dab22f100560036221 @marksteward marksteward committed Jul 10, 2011
Showing with 8 additions and 1 deletion.
  1. +1 −1 include/global_arrays.php
  2. +7 −0 index.php
@@ -465,7 +465,7 @@
"graphs_new.php" => 5,
"host.php" => 3,
"host_templates.php" => 12,
- "index.php" => 8,
+ "index.php" => 7,
"rra.php" => 9,
"settings.php" => 15,
"data_queries.php" => 13,
View
@@ -22,7 +22,14 @@
+-------------------------------------------------------------------------+
*/
+$guest_account = true;
include("./include/auth.php");
+
+if (db_fetch_cell("select id from user_auth where username='" . read_config_option("guest_user") . "'") == $_SESSION["sess_user_id"]) {
+ header('Location: graph_view.php');
+ exit;
+}
+
include("./include/top_header.php");
?>

0 comments on commit 9752db7

Please sign in to comment.