mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Adding one unmerged change from 17_STABLE. Was breaking some things...
This commit is contained in:
parent
dddf32590f
commit
0163b1d098
@ -128,7 +128,7 @@ function load_defaultuser_role() {
|
||||
}
|
||||
|
||||
if ($capabilities = get_records_select('role_capabilities',
|
||||
"roleid = $CFG->defaultuserroleid AND contextid = $sitecontext->id AND capability <> 0")) {
|
||||
"roleid = $CFG->defaultuserroleid AND contextid = $sitecontext->id AND permission <> 0")) {
|
||||
foreach ($capabilities as $capability) {
|
||||
if (!isset($USER->capabilities[$sitecontext->id][$capability->capability])) { // Don't overwrite
|
||||
$USER->capabilities[$sitecontext->id][$capability->capability] = $capability->permission;
|
||||
|
Loading…
x
Reference in New Issue
Block a user