Merge pull request #614 from wrongecho/notif-cleanup
Automatically cleanup dismissed notifications after 90 days
This commit is contained in:
3
cron.php
3
cron.php
@@ -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");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user