搜索用户修改为按昵称搜索

competition
z9hang 11 years ago
parent a7fa444f9e
commit 2e38f66899

@ -202,7 +202,8 @@ class User < Principal
where(nil)
else
pattern = "%#{arg.to_s.strip.downcase}%"
where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern)
#where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern)
where(" LOWER(login) LIKE :p ", :p => pattern)
end
}

Loading…
Cancel
Save