Searching member data (i.e. email field) when using Profile:Edit
Hi Low,
I'm using Low Search on a site that also uses Profile:Edit.
I have a search that allows admins to search through member profiles. This works fine, as Profile:Edit uses a standard channel and custom fields.
But the one area where I've come unstuck is when trying to search§ for the member's email address. With Profile:Edit, the member's email address uses the native member email field. I'm assuming that it's not possible to pull this email field into a search form, but I'm just asking to make sure.
The best workaround I can think of is to create an dummy custom field for the email and add this to the search form, and to have a cron job that runs every so often to copy the member email to this custom field, so that it remains in sync.
Thanks,
Stephen
Replies
Low 4 Jun 2013 07:35
Correct. But you can also search through non-field data using this approach. That should keep everything in sync automatically.
Stephen 4 Jun 2013 11:24
Hi Low,
Thanks for the suggestion. Unfortunately, I think that only works on the publish page, but I forgot to say that this part of my site is an extranet using SafeCracker. But I'll bear that in mind for other situations though. :-)
Thinking on, I think a better workaround than the one I mentioned above would be to simply add the custom email field alongside the member email field, and use jQuery to populate the hidden custom email field with the member email field. That would save having to use any cron jobs and would be much more efficient.
Thanks,
Stephen