MDL-50130 todo: Conditional code to be changed to API by MDL-50728
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 30 Jun 2015 17:56:48 +0000 (19:56 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 30 Jun 2015 17:56:48 +0000 (19:56 +0200)
user/lib.php

index 31e20f6..cf5c7eb 100644 (file)
@@ -336,6 +336,8 @@ function user_get_user_details($user, $course = null, array $userfields = array(
             $formfield = new $newfield($field->id, $user->id);
             if ($formfield->is_visible() and !$formfield->is_empty()) {
 
+                // TODO: Part of MDL-50728, this conditional coding must be moved to
+                // proper profile fields API so they are self-contained.
                 // We only use display_data in fields that require text formatting.
                 if ($field->datatype == 'text' or $field->datatype == 'textarea') {
                     $fieldvalue = $formfield->display_data();