We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a46fde0 commit ab920e3Copy full SHA for ab920e3
user/profile/lib.php
@@ -471,10 +471,9 @@ public function is_visible(?context $context = null): bool {
471
} else if ($this->userid == $USER->id) {
472
return true;
473
} else if ($this->userid > 0) {
474
- return has_capability('moodle/user:viewalldetails', $context);
475
- } else {
476
$coursecontext = context_course::instance($COURSE->id);
477
- return has_capability('moodle/site:viewuseridentity', $coursecontext);
+ return has_capability('moodle/site:viewuseridentity', $coursecontext) ||
+ has_capability('moodle/user:viewalldetails', $context);
478
}
479
case PROFILE_VISIBLE_ALL:
480
0 commit comments