Skip to content

Commit

Permalink
MDL-49566 notes: Notes link should not show up for guests
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal authored and mdjnelson committed Dec 29, 2015
1 parent afbb53d commit 59eef1a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions notes/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 59eef1a

Please sign in to comment.