MDL-87415 profile: set page title when accessed as guest user.

This commit is contained in:
Stefan Topfstedt
2025-12-12 13:41:52 -08:00
parent 5cf0c68c51
commit 2bffcbfc9a
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -1256,6 +1256,7 @@ $string['loginstepsnone'] = '<p>Hi!</p>
<p>If someone else has already chosen your username then you\'ll have to try again using a different username.</p>';
$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?';
+1
View File
@@ -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(),