MDL-50677 user: Prefix custom fields node name in profile tree

This commit is contained in:
Frederic Massart 2015-08-27 17:28:02 +08:00
parent 6d392b3027
commit 2b7848050d

View File

@ -373,7 +373,7 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user,
$newfield = 'profile_field_'.$field->datatype;
$formfield = new $newfield($field->id, $user->id);
if ($formfield->is_visible() and !$formfield->is_empty()) {
$node = new core_user\output\myprofile\node('contact', $formfield->field->shortname,
$node = new core_user\output\myprofile\node('contact', 'custom_field_' . $formfield->field->shortname,
format_string($formfield->field->name), null, null, $formfield->display_data());
$tree->add_node($node);
}