Member Search Showing No Results in Backend

I am having a Backend Member Search Issue!
In the backend when the admin searches for a user using the WP Search bar at the top right hand corner of the plugin

It shows nothing.

Please see attached screenshots. (proof the account exists haha)
And what happens after the search.

Have you guys seen this before?

Thanks,
Casey

  • Patrick
    • Support Monkey

    Hi again @Casey

    Thanks for creating a new ticket for this issue. :slight_smile:

    Looking closer at your screenshots, I can see that the username being searched for contains a character not usually allowed by WordPress (underscore).

    Notwithstanding that, WordPress cannot match partial searches. For example, if searching for username, entering only usern will return nothing if there is no user name with that exact match.

  • Casey
    • WPMU DEV Initiate

    @Patrick Cohen I See! Thanks for letting me know about that i was not aware.

    After searching for the full Username it worked
    and also searching for the Full "Name" it also worked.

    This seems a bit backward is there any way to make this search for even just first names aswel.

    Thanks,
    Casey

  • N
    • Flash Drive

    I'm going to make a comment here because I'm having the same issue as Casey.

    Wordpress does allow partial searching. If you go to the All Users page and do a partial search, it will return results containing the partial search term.

    Is there a way to get the Membership plugin to use the standard WP search functionality?

  • N
    • Flash Drive

    Ash,

    Thanks for your response.

    This is a little more than a feature request. Clients will view this missing functionality as the plugin being broken (e.g., "I searched for a member that is in the system, and it did not find them. Why isn't it working?").

    Are there any adjustments to class.membersearch.php that can be made either in functions.php or in the plugin file itself to allow partial searches?

  • Michael Bissett
    • Recruit

    Hey @N,

    While I can't advise on the modifications to class.membersearch.php, I do know that we're looking to have this type of functionality in Membership 4.0.

    In the meantime though, what I can suggest for both you and @Casey, is to use an asterisk in your searches.

    To borrow Casey's earlier example, if you knew the first part of the username, you'd do this kind of search:

    esthetik*

    (hope I spelled that right, it was a bit tricky to read)

    Or, if you knew the last part of it, you'd do a search like this:

    *admin

    It's a little more work, but at least it works.

    Hope that helps you both! :slight_smile:

    Regards,
    Michael

  • Michael Bissett
    • Recruit

    Hey @N,

    Didn't see your post earlier when I was writing my reply up, glad to see that you were able to find a more automatic solution for your problem. :slight_smile:

    If the idea is to do a partial search for a username though, instead of a first or last name, then the solution on the thread you posted won't solve that. But, in cases where you are doing name searches, I see no reason to not use that code.

    Regards,
    Michael

  • Casey
    • WPMU DEV Initiate

    I feel like i have been quite scarce on this thread. I have been keeping an eye on it though and thanks to everyone for the input!

    Thanks "N" for finding that code! That will get me out of strife till 4.0
    Champion!

    and yes @Michael Bissett it is "esthetik" haha.

    Thanks again everyone!

  • Patrick
    • Support Monkey

    Hey there @Casey & @N

    I hope you guys had a great weekend!

    Wordpress does allow partial searching.

    Whoops, my bad. I meant to specify that Membership doesn't accept partial searches.

    Didn't even occur to me to add an * at the time either.

    I'm glad a solution was found while waiting for the 4.0 awesomeness!

    I'm going to mark this thread resolved for now. But if you need more help on this issue, simply check the "Mark as not resolved" box below to re-open the ticket.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.