Commit 397f50e3 authored by John Okely's avatar John Okely
Browse files

MDL-52260 user: Fix error when saving profile with locked field

parent b6e2489f
......@@ -144,7 +144,7 @@ class user_edit_form extends moodleform {
if (!$mform->elementExists($formfield)) {
continue;
}
$value = $mform->getElementValue($formfield);
$value = $mform->getElement($formfield)->exportValue($mform->getElementValue($formfield)) ?: '';
$configvariable = 'field_lock_' . $field;
if (isset($authplugin->config->{$configvariable})) {
if ($authplugin->config->{$configvariable} === 'locked') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment