From 2bffcbfc9a90afa32ce8a208deb25c5f006cfd4b Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 12 Dec 2025 11:12:31 -0800 Subject: [PATCH] MDL-87415 profile: set page title when accessed as guest user. --- public/lang/en/moodle.php | 1 + public/user/view.php | 1 + 2 files changed, 2 insertions(+) diff --git a/public/lang/en/moodle.php b/public/lang/en/moodle.php index e9c0922a7a4..f3448da6728 100644 --- a/public/lang/en/moodle.php +++ b/public/lang/en/moodle.php @@ -1256,6 +1256,7 @@ $string['loginstepsnone'] = '

Hi!

If someone else has already chosen your username then you\'ll have to try again using a different username.

'; $string['loginto'] = 'Log in to {$a}'; $string['loginagain'] = 'Log in again'; +$string['loginrequired'] = 'Login required'; $string['logoof'] = 'Logo of {$a}'; $string['logout'] = 'Log out'; $string['logoutconfirm'] = 'Do you really want to log out?'; diff --git a/public/user/view.php b/public/user/view.php index 2390bc59022..f724a95d65d 100644 --- a/public/user/view.php +++ b/public/user/view.php @@ -66,6 +66,7 @@ if (!empty($CFG->forceloginforprofiles)) { // Guests do not have permissions to view anyone's profile if forceloginforprofiles is set. if (isguestuser()) { $PAGE->set_secondary_navigation(false); + $PAGE->set_title(get_string('loginrequired')); echo $OUTPUT->header(); echo $OUTPUT->confirm(get_string('guestcantaccessprofiles', 'error'), get_login_url(),