From e1f3202adb0b917a6ef1209aacc0f4b9d398624a Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 7 Aug 2004 13:36:57 +0000 Subject: [PATCH] FIxed a PHP5 notice --- lib/datalib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datalib.php b/lib/datalib.php index 0e7f340d34..7fbcbabf0c 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -1683,7 +1683,7 @@ function get_courses($categoryid="all", $sort="c.sortorder ASC", $fields="c.*") if (!empty($categoryselect)) { $sqland = "AND "; } - if (!empty($USER)) { // May need to check they are a teacher + if (!empty($USER->id)) { // May need to check they are a teacher if (!iscreator()) { $visiblecourses = "$sqland ((c.visible > 0) OR (t.userid = '$USER->id' AND t.course = c.id))"; $teachertable = ", {$CFG->prefix}user_teachers t"; -- 2.39.5