MDL-70786 report_log: respect fullname setting.

This commit is contained in:
Luca Bösch
2021-05-04 15:50:36 +02:00
parent 4874954a45
commit cdcf6f44fc
4 changed files with 45 additions and 15 deletions
+2 -2
View File
@@ -132,7 +132,7 @@ class report_log_table_log extends table_sql {
return false;
}
$this->userfullnames[$userid] = fullname($user);
$this->userfullnames[$userid] = fullname($user, has_capability('moodle/site:viewfullnames', $this->get_context()));
return $this->userfullnames[$userid];
}
@@ -596,7 +596,7 @@ class report_log_table_log extends table_sql {
" FROM {user} WHERE id " . $usql,
$uparams);
foreach ($users as $userid => $user) {
$this->userfullnames[$userid] = fullname($user);
$this->userfullnames[$userid] = fullname($user, has_capability('moodle/site:viewfullnames', $this->get_context()));
unset($userids[$userid]);
}