Ich konnte nicht herausfinden, wann es früher funktioniert hat, aber ich war in der Lage, beide Code-Pfade zu beheben (oder besser gesagt, konsistent zu machen).
main ← directory-search-custom-fields
opened 05:04PM - 09 Jun 26 UTC
Previously, the user directory (`/u`) search only matched usernames -- it never … found people by their *searchable* user custom field values (e.g. "Company" or "Member ID"), even though the quick search did. The gap appeared whenever `enable_names` was off or the term contained `_`, `.` or `-`, so member IDs, emails and phone numbers never matched.
This change lets the directory search those fields too, via an opt-in `search_custom_fields:` option on `UserSearch` that searches the `user_search_data` tsvector (mention autocomplete and chat are unchanged). It also escapes `LIKE` wildcards in the search term with `sanitize_sql_like`, and adds a tooltip warning that the "Searchable" toggle makes a field's value publicly findable in search.
Reported at https://meta.discourse.org/t/trouble-searching-user-custom-fields/404800
1 „Gefällt mir“