Fuzzy search for users by email

Author Message

Marco Rogers

Wednesday 03 November 2010 10:46:35 pm

I know I can fetch a particular user by email using eZUser::fetchByEmail. But it has to match exactly. I need to do a fuzzy search and the user account field isn't supported in an attribute filter. I can get by with something really simple that is equivalent to "select * from ezuser where email like "%foo%""

But obviously something more robust that supports querying other fields as well would be ideal.

Thanks
:Marco

Ivo Lukac

Thursday 04 November 2010 1:44:41 am

eZ Find is your friend :)

If you don't have it try making an extended attribute filter where you can add 'email like "%foo%" ' part

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.