Skip to content

Commit

Permalink
Merge branch 'MDL-56525' of https://github.com/ak4t0sh/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Dec 12, 2016
2 parents 6d23f14 + feda7b3 commit e36d9b3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions mod/forum/lib.php
Expand Up @@ -7493,15 +7493,6 @@ function forum_get_posts_by_user($user, array $courses, $musthaveaccess = false,
continue;
}

// Check whether the requested user is enrolled or has access to view the course
// if they don't we immediately have a problem.
if (!can_access_course($course, $user) && !is_enrolled($coursecontext, $user)) {
if ($musthaveaccess) {
print_error('notenrolled', 'forum');
}
continue;
}

// If groups are in use and enforced throughout the course then make sure
// we can meet in at least one course level group.
// Note that we check if either the current user or the requested user have
Expand Down

0 comments on commit e36d9b3

Please sign in to comment.