diff --git a/user/index.php b/user/index.php index 1b107b8f0ac..345da070600 100644 --- a/user/index.php +++ b/user/index.php @@ -589,7 +589,11 @@ echo '
'; echo ' '; echo ' '; - $displaylist['messageselect.php'] = get_string('messageselectadd'); + $displaylist = array(); + // fix for MDL-8885, only show this if user has capability + if (has_capability('moodle/site:readallmessages', $context)) { + $displaylist['messageselect.php'] = get_string('messageselectadd'); + } if ($course->enrolperiod) { $displaylist['extendenrol.php'] = get_string('extendenrol'); }