mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-47408 user: Add checking before adding blog's link.
Checking enableblogs and bloglevel, userid, constant BLOG_USER_LEVEL.
This commit is contained in:
parent
e2e1c98a7f
commit
66b864c797
@ -691,7 +691,7 @@ if ($mode === MODE_USERDETAILS) { // Print simple listing.
|
||||
|
||||
$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'));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user