MDL-21830 Prevent users from viewing names of all other site users - only teachers with role assign see the full name of not enrolled users when trying to access the profile
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@
|
||||
}
|
||||
|
||||
if (!has_capability('moodle/course:view', $coursecontext, $user->id, false)) {
|
||||
if (has_capability('moodle/course:view', $coursecontext)) {
|
||||
if (has_capability('moodle/role:assign', $coursecontext)) {
|
||||
print_header("$strpersonalprofile: ", "$strpersonalprofile: ",
|
||||
"<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
<a href=\"index.php?id=$course->id\">$strparticipants</a> -> $fullname",
|
||||
|
||||
Reference in New Issue
Block a user