Support » Plugin: amr users » [Plugin: amr users] Search term altered upon pagination

  • Resolved Twig


    It seems that certain characters in the search field get converted upon searching execution, resulting in zero results for pages > 1.

    To reproduce – create a bunch of entries that all share a search term (such as as the email address)

    Search on “”

    Several pages of results come back – all is good. However, now to go Page 2 (or click NEXT) – you see the search term has become “test-com”, which returns no results. Looks like a search hook/filter has replaced ‘.’ for ‘-‘. This is surely a bug?

    Great plugin tho! If this bug is fixed in the plus version, please let me know and I’ll upgrade.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author anmari


    HI sorry i missed this (I think updated all the feed urls and now I am not seeing them in my feed reader… )

    sounds weird – not deliberate at all – will look into it.

    Plugin Author anmari


    Hi Sith Lord Goz,

    I am unable to recreate what you are describing.

    Please check you are update to date with all versions and that nothing else is interfering.

    I don’t want to display emails publicly, so can offer a public test on the url (shouldn’t make any difference to the searching). I have of course tested locally with emails with links and without links.



    Users with urls

    Thread Starter Twig



    Hi there! Thanks for the follow up on this. I can however confirm this is a bug in amr-users. If you check out the steps below, you should be able to recreate it:

    * Completely clean WordPress 3.3.x or 3.4 install
    * No other plugins or customization
    * Install & activate amr-users
    * Create say 6 dummy user accounts (, etc.)
    * Go into Admin screen -> Users -> Users: Details report
    * Set results per page to be less than the total # of dummy users (so say 4)
    * Enter search term “”
    * It will show 4 of the 6 records, and show a “Next” button (and a Page 2 button)
    * Click either NEXT or Page 2.. you’ll see the querystring now reads “test-com” – and no records are returned

    Again, this bug only happens when you paginate to pages of results. The initial view is fine. I bet if you created a bunch of test account in your link in your post, and clicked “page 2” it would do the same thing.

    Hopefully it’s not a tough bug!

    Plugin Author anmari



    Yup – credit to you – thanks.
    I thought about for a while and realised it must be the sanitisation/validation doing something.

    There was a different sanitisation on non-page ‘1’s when the paginated links (so it can remember the search text). This sanitisation is TOO tight.

    Change line 572 of ameta-includes.php from

    $search = sanitize_title($_REQUEST['su']);


    $search = filter_var ($_REQUEST['su'], FILTER_SANITIZE_STRING );

    to be consistent.

    This will go up in the next update.

    Plugin Author anmari


    actually on further thought to be more wordpress consistent.

    the wordpress search uses strip_tags (more or less same thing), so this should use that too

    $search = strip_tags ($_REQUEST['su']);

    Next update will have both bits of sanitisation changed to that.

    Thread Starter Twig


    Great! Thank you for being such a responsive developer – you’re a credit to WP 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: amr users] Search term altered upon pagination’ is closed to new replies.