I want to edit moodle's password policy (I have admin account) but when i try to edit new values and after that push button
"Save changes" it don't saves edited value and insted shows me old default values i have moodle 3.5 and in it's opensource code in (admin->category.php) i have found code like this:
I am not experienced developer but from this code i found that admin user isn't allowed to edit settings at all
why this logic is placed in this code (Is it because password policy should't been edited or because of extra secuirity?)
If i make $adminediting always true my admin account would be able to change settings?
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
if ($PAGE->user_allowed_editing() && $adminediting != -1) {
$USER->editing = $adminediting;
}
if ($PAGE->user_allowed_editing()) {
$url = clone($PAGE->url);
if ($PAGE->user_is_editing()) {
$caption = get_string('blockseditoff');
$url->param('adminedit', 'off');
} else {
$caption = get_string('blocksediton');
$url->param('adminedit', 'on');
}
$buttons = $OUTPUT->single_button($url, $caption, 'get');
}