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 a9d0252 commit b587eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/index.php
Expand Up @@ -670,7 +670,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 b587eea

Please sign in to comment.