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);
    }
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);
    }
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 ) ; }
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.
Returns SQL to select required fields .