by
KK » Tue Nov 23, 2021 4:24 pm
@mwlarkin1, I gave this issue a fair bit of thought and it is proving to be a sticky one.
Problem is that the 'extended_user_email' field has been defined as
searchable='0'.
This has been done to prevent the emails from inadvertently appearing in search results of <cms:search>.
The query formulated by <cms:pages>, while searching for custom fields, uses the same field where the 'search value' mentioned above is stored and so comes up empty for emails.
To solve this quandary, my initial thought was to hook into the query and change it on-the-fly to use the field that stores the actual value (instead of the cleaned-up 'search value').
However, this field is not indexed and so could lead to performance issue if there are a large number of users.
So, now I think it'd be better if you go ahead and declare the 'extended_user_email' as searchable (taking care to exclude the users template for <cms:search> if your site happens to use it).
To do that, find the
add_hidden_fields() function in 'addons\extended\extended-users.php' and modify the following line to make
searchable='1' -
- Code: Select all
<cms:editable label='Extended-User Email' name='extended_user_email' type='text' searchable='0' />
Visiting the users template as super-admin will persist the change and now the email field should become searchable.
Mind you, if there are existing user records, the previously empty search field will not automatically be populated.
You'll need to save each page anew for this happen (if there are many existing pages, you may tweak the csv importer to do this in a staggered manner for you).
I am sorry there is no clean solution available but hope this tweak helps.