mirror of
https://github.com/itflow-org/itflow
synced 2026-08-21 15:05:11 +00:00
Expire all PW reset tokens nightly with cron
This commit is contained in:
@@ -112,6 +112,7 @@ mysqli_query($mysqli, "DELETE FROM shared_items WHERE item_expire_at < NOW()");
|
|||||||
|
|
||||||
// Invalidate any password reset links
|
// Invalidate any password reset links
|
||||||
mysqli_query($mysqli, "UPDATE users SET user_password_reset_token = NULL WHERE user_archived_at IS NULL");
|
mysqli_query($mysqli, "UPDATE users SET user_password_reset_token = NULL WHERE user_archived_at IS NULL");
|
||||||
|
mysqli_query($mysqli, "UPDATE users SET user_password_reset_token = NULL"); // TODO: Make this 'expired' tokens only when we actually use expiry
|
||||||
|
|
||||||
// Clean-up old dismissed notifications
|
// Clean-up old dismissed notifications
|
||||||
mysqli_query($mysqli, "DELETE FROM notifications WHERE notification_dismissed_at < CURDATE() - INTERVAL 90 DAY");
|
mysqli_query($mysqli, "DELETE FROM notifications WHERE notification_dismissed_at < CURDATE() - INTERVAL 90 DAY");
|
||||||
|
|||||||
Reference in New Issue
Block a user