Show the user's name in the title and header

This commit is contained in:
Martin Dougiamas
2010-07-12 13:42:42 +00:00
parent f59d8e45db
commit b45ac02884
+3 -3
View File
@@ -61,7 +61,7 @@ if (!$currentuser &&
!has_coursecontact_role($userid)) {
// Course managers can be browsed at site level. If not forceloginforprofiles, allow access (bug #4366)
$struser = get_string('user');
$PAGE->set_title("$SITE->shortname: $struser");
$PAGE->set_title("$SITE->shortname: $struser"); // Do not leak the name
$PAGE->set_heading("$SITE->shortname: $struser");
$PAGE->set_url('/user/profile.php', array('id'=>$userid));
$PAGE->navbar->add($struser);
@@ -105,8 +105,8 @@ $params = array('id'=>$userid);
$PAGE->set_url('/user/profile.php', $params);
$PAGE->blocks->add_region('content');
$PAGE->set_subpage($currentpage->id);
$PAGE->set_title("$SITE->shortname: $strpublicprofile");
$PAGE->set_heading("$SITE->shortname: $strpublicprofile");
$PAGE->set_title(fullname($user).": $strpublicprofile");
$PAGE->set_heading(fullname($user).": $strpublicprofile");
if (!$currentuser) {
$PAGE->navigation->extend_for_user($user);