FEATURE: Hidden `SiteSetting.keep_old_ip_address_count` to track IP history. (PR #10687)


This will be evaluated with every request so INSERTING and then DELETING additional may be suboptimal.

Maybe we should use CASE statement to INSERT a new record (if still in keep_old_ip_address_count limit) or UPDATE the oldest record.

Problem with that is that if you set keep_old_ip_address_count to 10 and then change it to 5, you will still have 10 records in DB and it will be never cleaned. So I am not sure if that would be much better in the end

@lis2 Actually, this was a mistake I made, I changed it so that we only log to the user_ip_address_histories table only if the IP address has been changed.

Thank you for reviewing @lis2