From eb8d85c1d355d4f13d2778e5ef939fd6d35db2e5 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 29 Jul 2010 03:03:03 +0000 Subject: [PATCH] NOBUG Added missing hiddenfields var from user/profile.php --- user/profile.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/user/profile.php b/user/profile.php index aa48790cbf3..9f3f00ca555 100644 --- a/user/profile.php +++ b/user/profile.php @@ -57,7 +57,7 @@ $context = $usercontext = get_context_instance(CONTEXT_USER, $userid, MUST_EXIST if (!$currentuser && !empty($CFG->forceloginforprofiles) && - !has_capability('moodle/user:viewdetails', $context) && + !has_capability('moodle/user:viewdetails', $context) && !has_coursecontact_role($userid)) { // Course managers can be browsed at site level. If not forceloginforprofiles, allow access (bug #4366) $struser = get_string('user'); @@ -96,7 +96,11 @@ if (isguestuser()) { // Guests can never edit their profile } } - +if (has_capability('moodle/user:viewhiddendetails', $context)) { + $hiddenfields = array(); +} else { + $hiddenfields = array_flip(explode(',', $CFG->hiddenuserfields)); +} // Start setting up the page $strpublicprofile = get_string('publicprofile');