From 47e5ed8e30e6b69918a4947c42a2e0feee9a8222 Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Thu, 4 Jun 2015 15:10:18 +0530 Subject: [PATCH] MDL-49566 notes: Notes link should not show up for guests --- notes/lib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/notes/lib.php b/notes/lib.php index a443a4b4c77..b21f1f6514e 100644 --- a/notes/lib.php +++ b/notes/lib.php @@ -386,6 +386,11 @@ function core_notes_myprofile_navigation(core_user\output\myprofile\tree $tree, return false; } + if (isguestuser($user)) { + // No notes for guest users. + return false; + } + $url = new moodle_url("/notes/index.php", array('user' => $user->id)); $title = get_string('notes', 'core_notes'); if (empty($course)) {