Slight change when checking for user.

This commit is contained in:
martin 2002-06-21 15:55:37 +00:00
parent 66092a38b7
commit 79a69a3a4b

View file

@ -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";