mirror of
https://github.com/moodle/moodle.git
synced 2025-01-30 03:58:34 +01:00
MDL-74181 user: remove secondary nav when viewing profile as guest.
This commit is contained in:
parent
967d9b2546
commit
4711a73731
@ -48,6 +48,7 @@ if (!empty($CFG->forceloginforprofiles)) {
|
||||
require_login();
|
||||
if (isguestuser()) {
|
||||
$PAGE->set_context(context_system::instance());
|
||||
$PAGE->has_secondary_navigation_setter(false);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->confirm(get_string('guestcantaccessprofiles', 'error'),
|
||||
get_login_url(),
|
||||
|
@ -65,6 +65,7 @@ if (!empty($CFG->forceloginforprofiles)) {
|
||||
|
||||
// Guests do not have permissions to view anyone's profile if forceloginforprofiles is set.
|
||||
if (isguestuser()) {
|
||||
$PAGE->has_secondary_navigation_setter(false);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->confirm(get_string('guestcantaccessprofiles', 'error'),
|
||||
get_login_url(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user