original_string: public function get_custom_user_profile_fields() {
          global $DB;
          // If already retrieved then return.
          if (!is_null($this->customfields)) {
              return $this->customfields;
          }
  
          $this->customfields = array();
          if ($proffields = $DB->get_records('user_info_field')) {
              foreach ($proffields as $proffield) {
                  $this->customfields[] = 'profile_field_'.$proffield->shortname;
              }
          }
          unset($proffields);
  
          return $this->customfields;
      }
code: public function get_custom_user_profile_fields() {
          global $DB;
          // If already retrieved then return.
          if (!is_null($this->customfields)) {
              return $this->customfields;
          }
  
          $this->customfields = array();
          if ($proffields = $DB->get_records('user_info_field')) {
              foreach ($proffields as $proffield) {
                  $this->customfields[] = 'profile_field_'.$proffield->shortname;
              }
          }
          unset($proffields);
  
          return $this->customfields;
      }
code_tokens: public function get_custom_user_profile_fields ( ) { global $ DB ; // If already retrieved then return. if ( ! is_null ( $ this -> customfields ) ) { return $ this -> customfields ; } $ this -> customfields = array ( ) ; if ( $ proffields = $ DB -> get_records ( 'user_info_field' ) ) { foreach ( $ proffields as $ proffield ) { $ this -> customfields [ ] = 'profile_field_' . $ proffield -> shortname ; } } unset ( $ proffields ) ; return $ this -> customfields ; }
docstring: Return custom user profile fields.
  
  @return array list of custom fields.
docstring_tokens: Return custom user profile fields .