MDL-56024 core_message: prevent WS error when messaging disabled

This commit is contained in:
Mark Nelson
2016-10-07 16:26:40 +08:00
parent 837941e9bc
commit 5f8e4733b8
+2 -2
View File
@@ -3221,9 +3221,9 @@ EOD;
* @return string HTML for the message menu
*/
public function message_menu() {
global $USER;
global $CFG, $USER;
if (isloggedin() && !user_not_fully_set_up($USER)) {
if (!empty($CFG->messaging) && isloggedin() && !user_not_fully_set_up($USER)) {
$context = [
'userid' => $USER->id,
'urls' => [