From e5c97cf83dda8156e4e68cc427626d84492e927f Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 2 Feb 2026 10:01:15 -0800 Subject: [PATCH] MDL-87694 profile: set top level heading when accessed as guest user. --- public/user/profile.php | 12 +++++++++--- public/user/view.php | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/public/user/profile.php b/public/user/profile.php index 9921bbbc238..415c047cc29 100644 --- a/public/user/profile.php +++ b/public/user/profile.php @@ -52,9 +52,15 @@ if (!empty($CFG->forceloginforprofiles)) { $PAGE->set_context(context_system::instance()); $PAGE->set_title(get_string('user')); echo $OUTPUT->header(); - echo $OUTPUT->confirm(get_string('guestcantaccessprofiles', 'error'), - get_login_url(), - $CFG->wwwroot); + echo $OUTPUT->confirm( + get_string('guestcantaccessprofiles', 'error'), + get_login_url(), + $CFG->wwwroot, + [ + 'headinglevel' => 1, + 'confirmtitle' => get_string('loginrequired'), + ], + ); echo $OUTPUT->footer(); die; } diff --git a/public/user/view.php b/public/user/view.php index f724a95d65d..361233d6f85 100644 --- a/public/user/view.php +++ b/public/user/view.php @@ -68,9 +68,15 @@ if (!empty($CFG->forceloginforprofiles)) { $PAGE->set_secondary_navigation(false); $PAGE->set_title(get_string('loginrequired')); echo $OUTPUT->header(); - echo $OUTPUT->confirm(get_string('guestcantaccessprofiles', 'error'), - get_login_url(), - $CFG->wwwroot); + echo $OUTPUT->confirm( + get_string('guestcantaccessprofiles', 'error'), + get_login_url(), + $CFG->wwwroot, + [ + 'headinglevel' => 1, + 'confirmtitle' => get_string('loginrequired'), + ], + ); echo $OUTPUT->footer(); die; }