Added check for guest user in forum_subscribed_users. Guest user should never be subsctibed to a forum.
This commit is contained in:
+4
-1
@@ -1679,13 +1679,16 @@ function forum_subscribed_users($course, $forum, $groupid=0, $cache=false) {
|
||||
AND u.deleted <> 1 $groupselect
|
||||
ORDER BY u.email ASC");
|
||||
}
|
||||
// Guest user should never be subscribed to a forum.
|
||||
if ($guest = guest_user()) {
|
||||
unset($results[$guest->id]);
|
||||
}
|
||||
|
||||
if ($cache) {
|
||||
$resultscache[$forum->id][$groupid] = $results;
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user