Fixed context in has_capability call MDL-13378 (merged)
This commit is contained in:
+1
-1
@@ -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>';
|
||||
|
||||
Reference in New Issue
Block a user