Commit eca7bfa6 authored by Ruslan Kabalin's avatar Ruslan Kabalin Committed by Richard Mansfield
Browse files

Find by realname bug fix


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 32f72753
......@@ -107,7 +107,7 @@ class PluginSearchInternal extends PluginSearch {
$querydata = split(' ', preg_replace('/\s\s+/', ' ', strtolower(trim($query_string))));
$hidenameallowed = get_config('userscanhiderealnames') ? 'TRUE' : 'FALSE';
$namesql = "(u.preferredname $ilike '%' || ? || '%')
OR ((u.preferredname IS NULL OR u.preferredname = '' OR NOT $hidenameallowed OR CAST(h.value AS INTEGER) <> 1)
OR ((u.preferredname IS NULL OR u.preferredname = '' OR NOT $hidenameallowed OR h.value != '1')
AND (u.firstname $ilike '%' || ? || '%' OR u.lastname $ilike '%' || ? || '%'))
OR (a.artefacttype IN $fieldlist
AND ( a.title $ilike '%' || ? || '%'))";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment