|
|
|
@ -206,11 +206,11 @@ class User < Principal
|
|
|
|
|
pattern = "%#{arg.to_s.strip.downcase}%"
|
|
|
|
|
#where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern)
|
|
|
|
|
if type == "0"
|
|
|
|
|
where(" LOWER(login) LIKE :p ", :p => pattern)
|
|
|
|
|
where(" LOWER(login) LIKE '#{pattern}' ")
|
|
|
|
|
elsif type == "1"
|
|
|
|
|
where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern)
|
|
|
|
|
where(" LOWER(concat(lastname, firstname)) LIKE '#{pattern}' ")
|
|
|
|
|
else
|
|
|
|
|
where(" LOWER(mail) LIKE :p ", :p => pattern)
|
|
|
|
|
where(" LOWER(mail) LIKE '#{pattern}' ")
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|