Merge pull request #614 from wrongecho/notif-cleanup

Automatically cleanup dismissed notifications after 90 days
This commit is contained in:
Johnny
2023-02-11 18:53:51 -05:00
committed by GitHub

View File

@@ -79,6 +79,9 @@ while($row = mysqli_fetch_array($sql_companies)){
// Invalidate any password reset links // Invalidate any password reset links
mysqli_query($mysqli, "UPDATE contacts SET contact_password_reset_token = NULL WHERE contact_archived_at IS NULL"); mysqli_query($mysqli, "UPDATE contacts SET contact_password_reset_token = NULL WHERE contact_archived_at IS NULL");
// Clean-up old dismissed notifications
mysqli_query($mysqli, "DELETE FROM notifications WHERE notification_dismissed_at < CURDATE() - INTERVAL 90 DAY");
/* /*