mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Fixed context in has_capability call MDL-13378 (merged)
This commit is contained in:
parent
279ac1a3e2
commit
b08261a100
@ -668,7 +668,7 @@
|
||||
$usercontext = $user->context;
|
||||
}
|
||||
|
||||
if ($piclink = ($USER->id == $user->id || has_capability('moodle/user:viewdetails', $context) ||has_capability('moodle/user:viewdetails', $context))) {
|
||||
if ($piclink = ($USER->id == $user->id || has_capability('moodle/user:viewdetails', $context) || has_capability('moodle/user:viewdetails', $usercontext))) {
|
||||
$profilelink = '<strong><a href="'.$CFG->wwwroot.'/user/view.php?id='.$user->id.'&course='.$course->id.'">'.fullname($user).'</a></strong>';
|
||||
} else {
|
||||
$profilelink = '<strong>'.fullname($user).'</strong>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user