I also have this issue I cannot change the days it always defaults to 30 days?
Same here. I found this in user_settings_menu on line 874:
<th><?php _e('Keep logs for', 'wp_user_log'); ?></th>
<td>
<input type="number" step="1" min="1" value="30" name="logdel">
But even change the value doesn’t do the trick.
Help is much appreciated
At least in version 1.2.3 of the plugin, the value submitted is not actually saved anywhere in the plugin, so that is why it reverts back to 30 days. It is only used in the following code that deletes logs older than the specified number of days:
if (isset($_POST['submit_display'])) {
$time_ago = $_POST['logdel'];
$wpdb->query("DELETE FROM wp_user_activity WHERE modified_date < NOW() - INTERVAL $time_ago DAY");
}
So when I edit wp_options > activity log settings in the database it will keep the log for 365 days?
Current code: a:1:{s:13:”logs_lifespan”;s:2:”30″;}
New code: a:1:{s:13:”logs_lifespan”;s:2:”365″;}
Regards,
Steven
Hi guys,
We have just read the tree. We will consider all this changes for next version of plugin and if required to provide settings option in backend then we will sure provide that option with plugin by default instead of custom coding.
Many thanks to all forum members who participated with this forum and provided guidenance to plugin users.
Ok cool! But for now? How exactly can I make sure the log will be deleted only after 365 days?
Hi steviger,
You mean you want to check logs are actually deleted or not those contains entry before 365 days.
Am I right?
@steviger : We are providing priority support on our support site. If you are looking for more features with this plugin then you can send your queries there.
Basicly I’d like to keep the logs for 365 days that’s all.
For now that is. I might try your priority support soon for further question. But this one is kinda urgent 😉
Hi steviger,
we have cross checked at our end with number of environments and it’s working nice here. I can easily change that ‘Keep Logs’ value to 365 days.
Can you please create a support ticket with our support site with more details?
Thanks in advance!