mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
NOBUG Added missing hiddenfields var from user/profile.php
This commit is contained in:
parent
58bd461cec
commit
eb8d85c1d3
1 changed files with 6 additions and 2 deletions
|
@ -57,7 +57,7 @@ $context = $usercontext = get_context_instance(CONTEXT_USER, $userid, MUST_EXIST
|
||||||
|
|
||||||
if (!$currentuser &&
|
if (!$currentuser &&
|
||||||
!empty($CFG->forceloginforprofiles) &&
|
!empty($CFG->forceloginforprofiles) &&
|
||||||
!has_capability('moodle/user:viewdetails', $context) &&
|
!has_capability('moodle/user:viewdetails', $context) &&
|
||||||
!has_coursecontact_role($userid)) {
|
!has_coursecontact_role($userid)) {
|
||||||
// Course managers can be browsed at site level. If not forceloginforprofiles, allow access (bug #4366)
|
// Course managers can be browsed at site level. If not forceloginforprofiles, allow access (bug #4366)
|
||||||
$struser = get_string('user');
|
$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
|
// Start setting up the page
|
||||||
$strpublicprofile = get_string('publicprofile');
|
$strpublicprofile = get_string('publicprofile');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue