mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-31 15:07:29 -08:00
Fix #782 The script will remove any registered user accounts that are not active that are 5 days old or older (by default). You can change the time frame to whatever liking you desire.
4 lines
326 B
Bash
4 lines
326 B
Bash
#!/bin/bash
|
|
# SCHEDULE WITH CRONTAB BASED ON TIME PERIOD UNACTIVE ACCOUNT SHOULD BE REMOVED. UPDATE INTERVAL DATE TO BE NUMBER OF DAYS OLD (OR OLDER) TO REMOVE.
|
|
mysql --defaults-file=./mysql.cnf -h localhost -e 'delete from servatrice.cockatrice_users where registrationDate < DATE_SUB(now(), INTERVAL 5 DAY) AND active = 0';
|