Add invite code system

This commit is contained in:
danwin1210 committed 2026-10-25 15:32:20 +01:00
1 parent 11fe088b64
commit e8b44ac1a9
7 files changed
+205 -11

No files matched your search

+2
View File
@@ -85,6 +85,8 @@ while ( $tmp = $stmt->fetch( PDO::FETCH_ASSOC ) ) {
$del_domain->execute( [ $tmp[ 'domain' ] ] );
}
}
// delete expired invite codes
$db->exec( 'DELETE FROM invite_codes WHERE created_at <= DATE_SUB(NOW(), INTERVAL ' . (int) INVITE_CODE_EXPIRATION_MONTHS . ' MONTH);' );
// delete squirrelmail attachments older than an hour
exec( 'find /var/local/squirrelmail/attach/ -type f -cmin +60 -delete' );
try {