All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

How to exclude entries with unqualified authors from results?

Selvin Ortiz 19 Apr 2013 07:53 question, complete

Basically, I have a collection of registries (entry) that members (author) have created and I am letting users search for them but... I want to remove entries from the results where the author that created that entry has no address listed on their profile.

There is currently no members collection, what I wanted to do was to filter the results before display, do the author address check and then passed the filtered results back to Low_Search... not sure if any of the available HOOKS will let me do that, if so... which one?

Replies

  1. Low 19 Apr 2013 08:08

    Couple of options. If you know beforehand which author IDs should be excluded, then you can use the native parameter author_id: author_id="not 1|2|3".

    If you want to check which author is valid or not for each search query, you could use the low_search_pre_search hook. Use it to set the author_id dynamically. So, query which author_ids are valid or not valid, then set the author_id param accordingly. The results will automatically be filtered accordingly.

  2. Selvin Ortiz 19 Apr 2013 08:12

    Both options are totally doable: )

    You're the man Low, thanks a bunch!