diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 0b78cccbec2..623354ba2b6 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -3873,7 +3873,7 @@ function forum_move_attachments($discussion, $forumfrom, $forumto) { * @return mixed string or array of (html text withouth images and image HTML) */ function forum_print_attachments($post, $cm, $type) { - global $CFG, $DB; + global $CFG, $DB, $USER; if (empty($post->attachment)) { return $type !== 'separateimages' ? '' : array('', '');