diff --git a/mod/forum/lib.php b/mod/forum/lib.php
index <HASH>..<HASH> 100644
--- a/mod/forum/lib.php
+++ b/mod/forum/lib.php
@@ -1255,7 +1255,7 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
         $umtable = '';
     } else {
         $umfields = ', um.firstname AS umfirstname, um.lastname AS umlastname';
-        $umtable = ' LEFT JOIN user um on (d.usermodified = um.id)';
+        $umtable = ' LEFT JOIN '.$CFG->prefix.'user um on (d.usermodified = um.id)';
     }
 
     return get_records_sql("SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid,
Corrected an SQL statement that used 'user' instead of $CFG->prefix.'user'.
Note - this is a left join of a table that is already inner joined in the
same statement. There may be other problems here.