original_string: protected function required_fields_sql($u) {
          // Raw list of fields.
          $fields = array('id');
          // Add additional name fields.
          $fields = array_merge($fields, get_all_user_name_fields(), $this->extrafields);
  
          // Prepend the table alias.
          if ($u) {
              foreach ($fields as &$field) {
                  $field = $u . '.' . $field;
              }
          }
          return implode(',', $fields);
      }
code: protected function required_fields_sql($u) {
          // Raw list of fields.
          $fields = array('id');
          // Add additional name fields.
          $fields = array_merge($fields, get_all_user_name_fields(), $this->extrafields);
  
          // Prepend the table alias.
          if ($u) {
              foreach ($fields as &$field) {
                  $field = $u . '.' . $field;
              }
          }
          return implode(',', $fields);
      }
code_tokens: protected function required_fields_sql ( $ u ) { // Raw list of fields. $ fields = array ( 'id' ) ; // Add additional name fields. $ fields = array_merge ( $ fields , get_all_user_name_fields ( ) , $ this -> extrafields ) ; // Prepend the table alias. if ( $ u ) { foreach ( $ fields as & $ field ) { $ field = $ u . '.' . $ field ; } } return implode ( ',' , $ fields ) ; }
docstring: Returns SQL to select required fields.
  
  @param string $u the table alias for the user table in the query being
  built. May be ''.
  @return string fragment of SQL to go in the select list of the query.
docstring_tokens: Returns SQL to select required fields .