WordPress.org

Support

Support » Plugins and Hacks » Simple Login Log » [Resolved] [Plugin: Simple Login Log] Clear logs?

[Resolved] [Plugin: Simple Login Log] Clear logs?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Also on general settings I set (Truncate Log Entries “1” days and older) but after 2 days the logs is still there, is this a bug or something?

    Thanks in advance!

    Plugin Author Max Chirkov

    @maxchirkov

    Hi there,

    You might be right. Could you please test it for me? In file simple-login-log.php line 177 which looks like this:

    $sql = $wpdb->prepare( "DELETE FROM {$this->table} WHERE time < DATE_SUB(CURDATE(),INTERVAL %d DAY)", array( $this->opt['log_duration']));

    substitute with this:

    $sql = $wpdb->prepare( "DELETE FROM {$this->table} WHERE time < DATE_SUB(CURDATE(),INTERVAL %d DAY)", array( (int)$this->opt['log_duration']));

    See if that clears your logs after 1 day.

    Hello Max, thanks for reply. I test your code but it doesn’t work. Any other suggestion please?

    Plugin Author Max Chirkov

    @maxchirkov

    I committed an updated version 0.9.1. It should work. Thanks for pointing out the issue.

    I get the update but no the problem is still remain. I don’t understand why I ‘m the only who have this bug… any ideas would be appreciated, thank you!

    Plugin Author Max Chirkov

    @maxchirkov

    You need to deactivate and re-activate the plugin to clear old cron job, which was incorrect in the previous version. Sorry about not clearing this up earlier. I’m not sure if the truncation will happen right away (it might) and it will wait until the next iteration of the cron job happens (which is 24 hours).

    I will give it a try thanks in advance I let you know.

    Deactivate – reactivate waiting 1 day nothing change, same issue.

    After update to the last release I notice that the code in to “simple-login-log/simple-login-log.php” is not the same like the codes you post above. After update the plugin I did not change any code because I thought that this release has contain the fix of this issue. This is the code I have right now.
    “$sql = $wpdb->prepare( “DELETE FROM {$table} WHERE time < DATE_SUB(CURDATE(),INTERVAL %d DAY)”, $log_duration);”

    Do you think I have to change it with the (fix) code you posted above?

    Thanks!

    Plugin Author Max Chirkov

    @maxchirkov

    No, no need to change anything. I just committed version 0.9.2 – I tested it multiple times and it works now.

    Yes is working. Thank you very much maxchirkov, appreciate your help!

    Plugin Author Max Chirkov

    @maxchirkov

    Awesome! Glad we got it resolved 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] [Plugin: Simple Login Log] Clear logs?’ is closed to new replies.
Skip to toolbar