Commit 318d93c4 authored by Julien Fastré's avatar Julien Fastré

fix privacy issue with similar person matcher

The condition to show only person from same center had no precedence with
name and firstname string.
parent 5acfbd0c
......@@ -70,10 +70,12 @@ class SimilarPersonMatcher
);
$dql = 'SELECT p from ChillPersonBundle:Person p WHERE'
. ' UNACCENT(LOWER(p.firstName)) LIKE UNACCENT(LOWER(:firstName))'
. ' OR UNACCENT(LOWER(p.lastName)) LIKE UNACCENT(LOWER(:lastName))'
. ' OR UNACCENT(LOWER(p.firstName)) LIKE UNACCENT(LOWER(:lastName))'
. ' OR UNACCENT(LOWER(p.lastName)) LIKE UNACCENT(LOWER(:firstName))'
. ' ('
. ' UNACCENT(LOWER(p.firstName)) LIKE UNACCENT(LOWER(:firstName)) '
. ' OR UNACCENT(LOWER(p.lastName)) LIKE UNACCENT(LOWER(:lastName)) '
. ' OR UNACCENT(LOWER(p.firstName)) LIKE UNACCENT(LOWER(:lastName)) '
. ' OR UNACCENT(LOWER(p.lastName)) LIKE UNACCENT(LOWER(:firstName)) '
. ' ) '
. ' AND p.center IN (:centers)';
$query =
......
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