original_string: public static function get_custom_profile_fields() {
          global $DB, $CFG;
  
          if (self::$customprofilefields === null) {
              // Get fields and store them indexed by shortname.
              require_once($CFG->dirroot . '/user/profile/lib.php');
              $fields = profile_get_custom_fields(true);
              self::$customprofilefields = array();
              foreach ($fields as $field) {
                  self::$customprofilefields[$field->shortname] = $field;
              }
          }
          return self::$customprofilefields;
      }
code: public static function get_custom_profile_fields() {
          global $DB, $CFG;
  
          if (self::$customprofilefields === null) {
              // Get fields and store them indexed by shortname.
              require_once($CFG->dirroot . '/user/profile/lib.php');
              $fields = profile_get_custom_fields(true);
              self::$customprofilefields = array();
              foreach ($fields as $field) {
                  self::$customprofilefields[$field->shortname] = $field;
              }
          }
          return self::$customprofilefields;
      }
code_tokens: public static function get_custom_profile_fields ( ) { global $ DB , $ CFG ; if ( self :: $ customprofilefields === null ) { // Get fields and store them indexed by shortname. require_once ( $ CFG -> dirroot . '/user/profile/lib.php' ) ; $ fields = profile_get_custom_fields ( true ) ; self :: $ customprofilefields = array ( ) ; foreach ( $ fields as $ field ) { self :: $ customprofilefields [ $ field -> shortname ] = $ field ; } } return self :: $ customprofilefields ; }
docstring: Gets data about custom profile fields. Cached statically in current
  request.
  
  This only includes fields which can be tested by the system (those whose
  data is cached in $USER object) - basically doesn't include textarea type
  fields.
  
  @return array Array of records indexed by shortname
docstring_tokens: Gets data about custom profile fields . Cached statically in current request .