Cleanup script to delete unactivated user accounts
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.
This commit is contained in:
parent
b0fe2ef9d3
commit
38b6235242
1 changed files with 3 additions and 0 deletions
3
servatrice/scripts/maint_removeinactiveplayeraccounts
Normal file
3
servatrice/scripts/maint_removeinactiveplayeraccounts
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/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';
|
Loading…
Reference in a new issue