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
@@ -130,7 +130,7 @@ if (!$currentuser) {
|
||||
}
|
||||
|
||||
if (!has_capability('moodle/course:view', $coursecontext, $user->id, false)) {
|
||||
if (has_capability('moodle/course:view', $coursecontext)) {
|
||||
if (has_capability('moodle/role:assign', $coursecontext)) {
|
||||
$PAGE->navbar->add($fullname);
|
||||
echo $OUTPUT->heading(get_string('notenrolled', $fullname));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user