Fixed User/Thread custom fields searcher is OR'ed together with finder criteria but not for entity criteria

Xon

Well-known member
Affected version
2.0.10
The Finder based search for users/threads implements a "applySpecialCriteriaValue" which translates the custom field matching into finder/SQL expressions.

This is compiled as $finder->whereOr() meaning at least 1 custom field must match, compared to notice/user promotion criteria which apply each custom field criteria to the user/thread (ie AND).

This is obviously unexpectedly inconsistent and makes SQL_based search return unexpected results, as criteria is AND'ed together. Except for custom field values.
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (2.0.12).

Change log:
Correctly combine multiple custom field-related limits to the user and thread searchers.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Worth noting that the whereOr concept was actually correct here, it was just applied at the wrong level. Each field is an "or" option for different choices (if applicable). So it really just meant moving the whereOr output in so it applied to each field.
 
Back
Top Bottom