Commit a0034bb0 authored by jun's avatar jun Committed by Eloy Lafuente (stronk7)

MDL-52433 user: Remove unnecessary capability check

parent 89b97390
......@@ -652,7 +652,6 @@ if ($mode === MODE_USERDETAILS) { // Print simple listing.
$row->cells[1]->text .= get_string('role').get_string('labelsep', 'langconfig').$user->role.'<br />';
}
if ($user->maildisplay == 1 or ($user->maildisplay == 2 and ($course->id != SITEID) and !isguestuser()) or
has_capability('moodle/course:viewhiddenuserfields', $context) or
in_array('email', $extrafields) or ($user->id == $USER->id)) {
$row->cells[1]->text .= get_string('email').get_string('labelsep', 'langconfig').html_writer::link("mailto:$user->email", $user->email) . '<br />';
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment