mirror of
https://github.com/moodle/moodle.git
synced 2025-05-31 21:19:49 +02:00
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:
parent
9707279af6
commit
871e5728e2
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user