Skip to content

Commit

Permalink
MDL-47408 user: Add checking before adding blog's link.
Browse files Browse the repository at this point in the history
Checking enableblogs  and bloglevel, userid, constant  BLOG_USER_LEVEL.
  • Loading branch information
DmitryNefedov committed Oct 2, 2014
1 parent e2e1c98 commit 66b864c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@

$links = array();

if ($CFG->enableblogs && $CFG->bloglevel > 0) {
if ($CFG->enableblogs && ($CFG->bloglevel != BLOG_USER_LEVEL || $USER->id == $user->id)) {
$links[] = html_writer::link(new moodle_url('/blog/index.php?userid='.$user->id), get_string('blogs', 'blog'));
}

Expand Down

0 comments on commit 66b864c

Please sign in to comment.