Slight change when checking for user.
authormartin <martin>
Fri, 21 Jun 2002 15:55:37 +0000 (15:55 +0000)
committermartin <martin>
Fri, 21 Jun 2002 15:55:37 +0000 (15:55 +0000)
index.php

index ce9651af1c49dc985e6639126123cf2554eff914..d1518fa54b5a2c38524fea3ee51136509e930d18 100644 (file)
--- a/index.php
+++ b/index.php
@@ -10,7 +10,7 @@
         redirect("$CFG->wwwroot/admin/");
     }
 
-    if ($USER) {
+    if (isset($USER->id)) {
         $headerbutton = update_course_icon($site->id);
     } else {
         $headerbutton = "<FONT SIZE=2><A HREF=\"login/\">Log in</A></FONT>";
@@ -70,7 +70,7 @@
                  error("Could not find or create a main forum for the site");
              }
 
-             if ($USER) {
+             if (isset($USER->id)) {
                  $SESSION->fromdiscuss = "$CFG->wwwroot";
                  if (is_subscribed($USER->id, $newsforum->id)) {
                      $subtext = "Unsubscribe from news";