From a9cbf8cc58c84f9d1fb576535278bd4754266015 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 16 Aug 2004 02:15:24 +0000 Subject: [PATCH] Always let a user see themselves. --- user/view.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/user/view.php b/user/view.php index dee695e2ff..f42a1ed788 100644 --- a/user/view.php +++ b/user/view.php @@ -40,6 +40,12 @@ $personalprofile = get_string("personalprofile"); $participants = get_string("participants"); + if (empty($USER->id)) { + $currentuser = false; + } else { + $currentuser = ($user->id == $USER->id); + } + if (groupmode($course) == SEPARATEGROUPS and !isteacheredit($course->id)) { // Groups must be kept separate require_login(); @@ -52,7 +58,7 @@ } } - if (!$course->category) { // To reduce possibility of "browsing" userbase at site level + if (!$course->category and !$currentuser) { // To reduce possibility of "browsing" userbase at site level if (!isteacher() and !isteacher(0, $user->id) ) { // Teachers can browse and be browsed at site level print_header("$personalprofile: ", "$personalprofile: ", "id\">$participants", @@ -99,11 +105,6 @@ echo "
"; echo "

$fullname

"; echo "
"; - if (empty($USER->id)) { - $currentuser = false; - } else { - $currentuser = ($user->id == $USER->id); - } if (($currentuser and !isguest()) or isadmin()) { if(empty($CFG->loginhttps)) { $wwwroot = $CFG->wwwroot; -- 2.39.5