mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-26859 do not show "my blog" link to guests and not-logged-in users
This commit is contained in:
parent
fd85ceac57
commit
5b183f51a8
@ -398,12 +398,14 @@ function blog_get_all_options(moodle_page $page, stdClass $userid = null) {
|
||||
}
|
||||
|
||||
// Get the options for the user
|
||||
if ($user !== null) {
|
||||
if ($user !== null and !isguestuser($user)) {
|
||||
// Load for the requested user
|
||||
$options[CONTEXT_USER+1] = blog_get_options_for_user($user);
|
||||
}
|
||||
// Load for the current user
|
||||
$options[CONTEXT_USER] = blog_get_options_for_user();
|
||||
if (isloggedin() and !isguestuser()) {
|
||||
$options[CONTEXT_USER] = blog_get_options_for_user();
|
||||
}
|
||||
}
|
||||
|
||||
// If blog level is global then display a link to view all site entries
|
||||
|
Loading…
x
Reference in New Issue
Block a user