From 871e5728e2708d6f32887f515f485ea6229c5ec1 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 18 Mar 2010 22:15:41 +0000 Subject: [PATCH] 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 --- user/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/view.php b/user/view.php index 318183b0cd7..a0701d4a133 100644 --- a/user/view.php +++ b/user/view.php @@ -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 { -- 2.36.1