Co-Authors Plus
[resolved] AJAX search doesn't find some users (with fix) (3 posts)

  1. Senning
    Posted 3 years ago #

    As a news blog, we have a 'Torontoist' user with the same name as the site to whom we sometimes assign posts. A lot of our contributors also have e-mail addresses with the blog's name, either as addresses with our domain or as GMail plus sign addresses. Because search_authors only finds the first 10 matches to terms, our group user wouldn't be found by the AJAX search, and we'd actually get no results.

    On line 890, I upped 'number' to 1000 which solved the problem for us, but might not for blogs with more user accounts.


  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 3 years ago #

    Great find! I've added a filter so you can safely increase that value without modifying the plugin.

  3. Senning
    Posted 3 years ago #

    Great! I've added the change to our code and it's working as expected, thanks! I'm worried that it might not be a scalable solution, and we're getting long lists of results. The get_users() search on line 877 actually returns our group user first. I might be missing something, but would it be possible to integrate those results those in found_terms and give them priority?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Co-Authors Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.