WordPress.org

Forums

Simple Login Log
[resolved] Small enhancement suggested on search feature (2 posts)

  1. Commeuneimage
    Member
    Posted 3 years ago #

    I find more useful to perform a search on part of username and/or IP address (that way, for example, I can see if different users use the same IP).

    So I made the following change in line #453
    was:
    $where['filter'] = "user_login = '%{$_GET['filter']}%'";
    becames:
    $where['filter'] = "(user_login LIKE '%{$_GET['filter']}%' OR ip LIKE '%{$_GET['filter']}%')";

    Notice that the number of returned results is limited to 20 (which is initial default value) and not the actual parametered value in screen option.

    http://wordpress.org/extend/plugins/simple-login-log/

  2. Max Chirkov
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the improvement suggestion. I will commit it in the next update.

    As for the results limit - actually, if you look into the code, you'll see that I have overwritten SQL statement without a limit, because that's how the table class works in wp in order to get all the pagination correctly. So, basically I had some orphan code that wasn't being used. I'll remove the unused lines as well.

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Login Log
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic