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

This commit is contained in:
John Okely 2015-11-24 12:25:21 +08:00
parent c18acb8997
commit 956caef6ad

View file

@ -137,7 +137,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') {