MDL-74181 user: remove secondary nav when viewing profile as guest.

This commit is contained in:
Paul Holden 2022-03-15 00:31:06 +00:00
parent 967d9b2546
commit 4711a73731
2 changed files with 2 additions and 0 deletions

View File

@ -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(),

View File

@ -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(),