Commit 38b62352 authored by woogerboy21's avatar woogerboy21
Browse files

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.
parent b0fe2ef9
#!/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';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment