MDL-31599 block_news - incorrect RSS feed for guest user
authorDan Poltawski <dan@moodle.com>
Thu, 2 Aug 2012 03:08:28 +0000 (11:08 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 2 Aug 2012 03:11:29 +0000 (11:11 +0800)
Was previously using the userid 0, rather than guest to use
authenticated RSS feed.

Thanks to Paul Verrall at LUNS for helping me debug this.

blocks/news_items/block_news_items.php

index 6fcd152..24e9ca0 100644 (file)
@@ -106,7 +106,7 @@ class block_news_items extends block_base {
                     $tooltiptext = get_string('rsssubscriberssposts','forum');
                 }
                 if (!isloggedin()) {
-                    $userid = 0;
+                    $userid = $CFG->siteguest;
                 } else {
                     $userid = $USER->id;
                 }